Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
李华顺
@huacnlee
管理员
第 2 位会员 / 2011-10-28

[email protected]
长桥证券 (Longbridge)
成都
502 篇帖子 / 9058 条回帖
959 关注者
53 正在关注
105 收藏
打赏作者
GitHub Public Repos
  • autocorrect 1410

    A linter and formatter to help you to improve copywriting, correct spaces, words, and punctuation...

  • rails-settings-cached 1101

    Global settings for your Rails application.

  • rucaptcha 696

    Captcha Gem for Rails, which generates captcha image by Rust.

  • zed-theme-macos-classic 95

    A macOS native style theme for Zed, let it same like native app in macOS.

  • vscode-macos-classic.t... 21

    macOS Classic theme for Visual Studio Code

  • zed-extension-action 19

    GitHub Action for automatically bump Zed Extensions version after a release.

  • autocorrect-action 11

    GitHub action for use AutoCorrect as lint

  • zed-autocorrect 6

    AutoCorrect for Zed

  • gpui-workspace 4

    Dock layout UI component for GPUI, that extracted from Zed project.

  • zed-lalrpop 3

    LALRPOP parser grammar support for Zed.

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • Turbolinks 引入 prefetch 让你的网站速度起飞 at 2020年10月20日

    其实本身你用法就是错误的,a 里面放 div 是错误的语法。Dom 解析器可能无法正确识别。

    你可以换成 a > span,来解决

  • make install_ssl 更新证书报错,最新版本 at 2020年10月20日

    你更新一下 homeland-docker,这个问题我之前修过了

  • Ruby on Rails 工程师去大厂 at 2020年10月19日

    没岗位,比较难坚持,还是挺难撑下去的。

    我之前在阿里,Ruby 写了 3 年,能用的项目少,各方面原因都有,后面不得不写一些其他的,比如 Java、Node.js


    然后看你说的,难道你作为 Rails 工程师,不会前端么?

  • Turbolinks 引入 prefetch 让你的网站速度起飞 at 2020年10月18日

    这个看起来像是 GA 的初始化和 Turbolinks 的初始化冲突,是不是没改为 turbolinks:load

  • Turbolinks 引入 prefetch 让你的网站速度起飞 at 2020年10月15日

    我分析了一下你的页面,是你的 HTML 结构有问题,外层那个 a 标签 CSS 盒子没撑开。

    你试试给它们增加:display: block 样式,或者 clearfix 之类的东西。

  • Turbolinks 引入 prefetch 让你的网站速度起飞 at 2020年10月15日

    我查查,貌似 event.target 这里需要优化一下

  • 如何实现一个信息架构友好的标签系统 at 2020年10月15日
    group_by(&method(:clean_name))
    

    &method 这个用法学习了!

  • 如何实现一个信息架构友好的标签系统 at 2020年10月15日

    你这样,似乎 taggings 表没用处了


    早期我做电影网站的时候,在 MongoDB 里面也做过类似这样的 Tag 存储方式,不过我是直接把 Tag 名称到业务表字段里面

    现在回头看,直接存储 tag_name 似乎有些不妥,应该转成 tag_id 来存的

    bookmark.countries = %w[中国 美国]
    

    https://github.com/huacnlee/mongoid_taggable_on

  • 技术论坛是不是把服务器放在国外比较稳 at 2020年10月10日

    跟服务器没关系啊,服务器随时都可以换。

    关键是 ORG 的域名不让备案

  • Ruby 3.0.0-preview 版发布了 at 2020年10月10日

    你想多了,我登录的时候,我可以打开那个页面的。 然后就算还有问题,我可以把它 map 到 /admin/sidekiq

  • Turbolinks 引入 prefetch 让你的网站速度起飞 at 2020年10月10日

    是应该在 click 的时候 cancel 掉正在预先加载的请求

  • Rails UJS + Stimulusjs + Turbolinks 5 = ❤️ at 2020年10月09日

    不喜欢 tailwindcss 的 CSS 命名风格

  • Rails 能不能定义好枚举字段的哈希值比如 true 代表 男 false 代表女 at 2020年09月30日
    irb> @book.status
    "draft"
    

    这个是 Rails 原本的设计,并且是一个最佳的实现。

    你可以去看看 https://api.rubyonrails.org/classes/ActiveRecord/Enum.html#method-i-enum

    实际上用 Enum 的方式,我们在代码层始终会用字符串的方式来使用 enum,而走 ActiveRecord 存储的时候,ActiveRecord 会把它自动转换为 int 类型。

  • homeland 如何修改网页默认的 title at 2020年09月29日

    app_name 配置

    https://homeland.ruby-china.org/docs/configuration/config-file/

  • Ruby 3.0.0-preview 版发布了 at 2020年09月28日

    准备回滚了,有内存泄漏,Ruby 2.7 是没问题的

  • Ruby 3.0.0-preview 版发布了 at 2020年09月28日

    已经部署 3.0.0-preview1 上线

  • Ruby 3.0.0-preview 版发布了 at 2020年09月28日

    Ruby China 已经准备好升级了:

    https://github.com/ruby-china/homeland/pull/1192

  • Ruby 3.0.0-preview 版发布了 at 2020年09月28日

    RVM 的 master 已经可以更新来安装 Ruby 3.0.0-preview1 了

    $ rvm get head
    $ rvm install ruby-3.0.0-preview1
    
  • Rails 能不能定义好枚举字段的哈希值比如 true 代表 男 false 代表女 at 2020年09月27日

    https://github.com/huacnlee/enumize

    看这篇说明:

    https://ruby-china.org/topics/38728

  • 不懂就问,homeland 的新用户注册为何不需要邮箱验证? at 2020年09月27日

    因为可以通过邮箱找回密码找回账号,所以抢注不影响。

    确认邮箱流程,在 Homeland 这类场景这么做会显得太复杂

  • 二次开发 homeland 我碰到一个奇怪问题 新建一个 movie_controller 下面的 view 使用不了关注功能 页面的 js 代码 都一模一样 at 2020年09月27日

    仔细阅读项目,看看哪些 JS 文件怎么回事的。

    那个关注、点赞你要找到对应的 JS 逻辑看事件绑定。

    另外问题没问题清楚。

  • Ruby 3.0.0-preview 版发布了 at 2020年09月27日

    我来试试跑 Ruby China

  • 求解关于 log 中 set NAMES utf-8, @@SESSION.wati_timeout,EXPLAIN 的含义和解决方法 at 2020年09月23日

    EXPLAIN 是 Rails 的特性:

    https://weblog.rubyonrails.org/2011/12/6/what-s-new-in-edge-rails-explain/

    config.active_record.auto_explain_threshold_in_seconds = 0.5
    

    Rails 3.2 有这个功能,当你的某个 SQL 查询时间超过了设定的档位,将会自动做 EXPLAIN 动作。

    这个功能我很少关注,貌似 Rails 4.0 去掉了这个功能。

    Remove automatic execution of EXPLAIN queries. The option active_record.auto_explain_threshold_in_seconds is no longer used and should be removed.

    https://guides.rubyonrails.org/4_0_release_notes.html


    你用的什么版本 Rails?


    第二个问题:set NAMES utf-8

    看起来,你的数据库可能不是 UTF-8 的

  • 搜索页面,如果只检索标题,需要使用 ElasticSearch 的吗? at 2020年09月23日

    你不需要 ElasticSearch

  • hackershare: Social bookmarking reinvented! at 2020年09月22日
    • 那个头像加载太慢了,ActiveStoreage 现在有 public 模式,可以生成 CDN 链接,减少应用服务器请求;
    • https://hackershare.dev/bookmarks/181,这种 URL 不够简洁,可以用个抽象的简单的名字,比如 thread / share 或者更简化一下,叫 t
    • HTML 里面有 I18n 的代码,本身服务器在国内访问慢,可以想办法打包到 JS 里面去,减少动态页面传输;
    • 另外,香港服务器国内访问挺快的,你那个哪里的怎么这么慢?

    点赞 / 收藏 / 点击记录 什么的,居然不用我的 ActionStore 🤔

    https://github.com/rails-engine/action-store

  • Vue UI 框架选择: Vuetify vs. BootstrapVue at 2020年09月21日

    掌握一套 UI 组件的 API,以后有一天用 React 也可以用 Ant Design。

  • Vue UI 框架选择: Vuetify vs. BootstrapVue at 2020年09月18日

    用 Ant Design 不纠结

    https://www.antdv.com

  • PostgreSQL with Gorm 区分大小写的问题 at 2020年09月17日

    为何你不用小写来建表?

  • 上一页
  • 1
  • 2
  • …
  • 4
  • 5
  • 6
  • 7
  • 8
  • …
  • 264
  • 265
  • 下一页
关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English