Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
李华顺
@huacnlee
Admin
NO. 2 / 2011-10-28

[email protected]
长桥证券 (Longbridge)
成都
502 Topics / 9063 Replies
961 Followers
53 Following
105 Favorites
Reward
GitHub Public Repos
  • autocorrect 1483

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

  • rails-settings-cached 1114

    Global settings for your Rails application.

  • rucaptcha 698

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

  • zed-theme-macos-classic 112

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

  • zed-extension-action 24

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

  • vscode-macos-classic.t... 23

    macOS Classic theme for Visual Studio Code

  • color-lsp 23

    A document color language server.

  • autocorrect-action 12

    GitHub action for use AutoCorrect as lint

  • zed-csv 8

    CSV support for Zed

  • gpui-workspace 7

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

More on GitHub
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • 怎么实现 unicode 编码,比如想要获取字符串"map"对应的编码内容"map" at May 31, 2021
    require "cgi"
    
    CGI.unescape_html("map")
    # => "map"
    

    https://ruby-doc.org/stdlib-3.0.0/libdoc/cgi/rdoc/CGI/Util.html#method-i-unescape_html

  • 大家有没有留意过 Kernel::require 这个 API 的性能问题 at May 20, 2021

    影响 Ruby 启动,尤其是作为 Cli 工具的场景。比如 Rubocop

  • 最近 Basecamp 的瓜有人在吃么? at May 01, 2021

    今天一早 Twitter Timeline 都是离职的 Tweet,事情好大

  • 为这个世界操碎了心 at April 28, 2021

    我只想说:能力不行,怪工具!

  • 有没有用过 Authing 做身份管理(注册登录)的朋友分享一下使用体验? at April 25, 2021

    他不是 OAuth 么,用 OmniAuth 包装一下,然后出个 omniauth-authing

  • Getting Started with Rails & TiDB at April 22, 2021

    你们用 TiDB 来干啥了

  • Ruby 社区的氛围为什么这么好? at April 22, 2021

    学就好了啊,谈啥转行,多一门技能

  • 为什么去掉了 “其他节点” 链接?感觉不方便 at April 13, 2021

    有的啊

  • 大佬们帮忙看看这个怎么回事可以吗 at April 12, 2021

    可以修改 head_html 用 CSS 来隐藏

  • 大佬们帮忙看看这个怎么回事可以吗 at April 12, 2021

    社区关不掉的

  • 大佬们帮忙看看这个怎么回事可以吗 at April 11, 2021

    修改 homeland-docker 的文件 etc/caddy/Caddyfile,把 第一行 修改一下可以解决

    - {$domain}
    + {$domain}, www.{$domain}
    
  • 大佬们帮忙看看这个怎么回事可以吗 at April 09, 2021

    看起来是因为你申请 SSL 用的是 kuanshu.net,但对外绑定,访问用的是 www.kuanshu.net

  • hash_map_attributes 将 JSON 类型的字段映射为具体的方法,方便 CRUD at April 09, 2021

    这个是 ActiveRecord::Store 可以完成的事情呀

    https://api.rubyonrails.org/v5.2.0/classes/ActiveRecord/Store.html

    class User < ActiveRecord::Base
      store :settings, accessors: [ :color, :homepage ], coder: JSON
      store :parent, accessors: [ :name ], coder: JSON, prefix: true
      store :spouse, accessors: [ :name ], coder: JSON, prefix: :partner
      store :settings, accessors: [ :two_factor_auth ], suffix: true
      store :settings, accessors: [ :login_retry ], suffix: :config
    end
    
    u = User.new(color: 'black', homepage: '37signals.com', parent_name: 'Mary', partner_name: 'Lily')
    u.color                          # Accessor stored attribute
    u.parent_name                    # Accessor stored attribute with prefix
    u.partner_name                   # Accessor stored attribute with custom prefix
    u.two_factor_auth_settings       # Accessor stored attribute with suffix
    u.login_retry_config             # Accessor stored attribute with custom suffix
    u.settings[:country] = 'Denmark' # Any attribute, even if not specified with an accessor
    
    # There is no difference between strings and symbols for accessing custom attributes
    u.settings[:country]  # => 'Denmark'
    u.settings['country'] # => 'Denmark'
    
    # Dirty tracking
    u.color = 'green'
    u.color_changed? # => true
    u.color_was # => 'black'
    u.color_change # => ['black', 'red']
    
  • 上海 Ruby Tuesday 求反馈 📝 at March 31, 2021

    第一段,第一句怎么写得这么难听

  • Rails 因為 mimemagic 炸了 at March 30, 2021

    CarrierWave 2.2.0 还在依赖 mimemagic

    等发布

    https://github.com/carrierwaveuploader/carrierwave/pull/2551

    $ bundle update rails carrierwave
    
  • 最近遇到一个头疼的问题,各位大神帮忙看看,我在最后一章练习完之后,不知道怎么回事出现了这个错误 at March 23, 2021

    Webpack 建议单独启动,先启动 Webpack,然后在启动 Rails

    ./bin/webpack-dev-server
    

    然后另外一个窗口启动 Rails

    rails s
    

    从截图上看,是在 Webpack 打包的时候有不少错误,其中问题挺明显的。

    你需要单独关注 Webpack 那个窗口,看看错误信息,并解决错误信息,一般情况下错误都写得比较清楚的,不过不动,可以到去查 Webpack 相关的错误信息(而不是找 Rails 的)这个要分清楚,不然你解决问题是盲目的。

  • 好像发现 ruby china 的一个 bug at March 22, 2021

    Turbolinks 问题,那个 404 页面是一个静态页,我找时间看看

  • GitLab 成立中国合资公司「极狐」,首轮获得数亿元投资 at March 19, 2021

    GitLab 的市场主要是企业私有化部署,跟 gitee 算不上

  • 老大帮忙看看这是什么问题 at March 15, 2021

  • 老大帮忙看看这是什么问题 at March 14, 2021

    后台改一下,那个设置项

  • 有没有人可以帮个忙啊各位大佬 at March 13, 2021

    域名是不是外网无法访问?最好看看 Caddy 的日志

    docker-compose logs caddy

  • passenger+nginx 部署生产环境,chrome 把 http 自动调成 https at March 01, 2021

    检查 config/environments/production.rb 里面的 config.force_ssl 确保设置为 false

    # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
    config.force_ssl = false
    
  • Homeland 手机端访问无法点赞?无法引用回复?发表话题无法上传图片? at February 23, 2021

    我刚刚试了一下,是可以的

  • 部署出错,着急,请教! at February 06, 2021

    bin/yarn 可能没 chmod +x

  • Rails 6.1 正式发布了~! at February 01, 2021

    原来那样同一个 name 字段二次过滤条件,明显是错误的逻辑,没人会这么查,因为 name 不可能同时是 John 和 David

    这是修正了 Bug

  • 各位同僚都用什么工具写 Rails? at January 31, 2021

    TextMate 更新太慢,已经换 VS Code 了

  • null at January 20, 2021

    我搞了没人维护,我没这类需求,这次搞了,后期也难以保持持续的维护。

    如果谁可以写一个 GitHub Actions 自动同步,我在 Ruby China 的 GitHub 组织上可以开一个项目,配置好 UpYun 的 Key, Secret,这样可以完整利用 UpYun 的 Bucket 来做静态的网站。

  • ActionStore - 一步到位的 Like, Follow, Star, Block ... 等动作的解决方案 at January 12, 2021

    1.1.0 版本已发布,现在支持“使用不同的表来存储 actions”

    https://ruby-china.org/topics/32262#%E4%BD%BF%E7%94%A8%E4%B8%8D%E5%90%8C%E7%9A%84%E8%A1%A8%E6%9D%A5%E5%AD%98%E5%82%A8%20actions

  • ruby quiz at January 10, 2021

    我恢复了,后台增加了了撤销删除功能。

  • Rails 6.1 正式发布了~! at January 10, 2021

    没有这类使用场景

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