Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
Rei
@Rei
管理员
第 1 位会员 / 2011-10-28

[email protected]
深圳
189 篇帖子 / 9169 条回帖
732 关注者
0 正在关注
11 收藏
中下水平 Rails 程序员
打赏作者
GitHub Public Repos
  • writings 941

    [Closed] Source code of writings.io

  • alipay 732

    Unofficial alipay ruby gem

  • code_campo 291

    [Closed] Source code of http://codecampo.com

  • asciidoctor-pdf-cjk-ka... 101

    **no longer maintained**

  • geeknote 35

  • asciidoctor-htmlbook 31

    Asciidoctor HTMLBook is an Asciidoctor backend for converting AsciiDoc documents to HTMLBook docu...

  • material-ui 17

  • rich-text-editor 12

  • htmlrenderer 12

  • rails-chatgpt-demo 8

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • Sublime Text 2 和 TextMate 选择哪个入门开发 Rails 更好? at 2015年08月31日

    DHH 用的是 TextMate。

    程序员编辑器都是要靠插件和配置的,不会 google 就哪个都难用。

  • 部署到服务器 asset 里的 css 和 js 时不时加载不上,内存不足么? at 2015年08月31日

    #17 楼 @liguangsong 私有不看,邮件已删,建议改密码。

  • 部署到服务器 asset 里的 css 和 js 时不时加载不上,内存不足么? at 2015年08月31日

    #13 楼 @liguangsong 把代码发到 github。

  • 3.times { say '《Ruby 元编程》第 2 版来了' } at 2015年08月31日

    👍 Ruby 必读书。

  • 部署到服务器 asset 里的 css 和 js 时不时加载不上,内存不足么? at 2015年08月31日

    不要靠猜,看浏览器调试,看静态服务器日志,看应用日志。

  • Rails 4-2-stable 参考手册 (Beta) at 2015年08月31日

    #63 楼 @leekelby 本地生成可解决。

  • 请教一个 Linux 问题,如何将一个服务器完全隐藏起来? at 2015年08月29日

    找提供私有网络的提供商,例如 https://www.digitalocean.com/company/blog/introducing-private-networking/

    自己做的话,就是不接入公网。

  • GitHub: Scaling on Ruby, with a nomadic tech team at 2015年08月28日

    不过以前看过分享说 Github 用的语言也不少的,https://hubot.github.com/ 就是用 coffeescript。

  • 为什么都说 Devise 很慢? at 2015年08月27日

    为什么说“为什么都说 Devise 很慢?”?

  • Turbolinks 遇上 多说 at 2015年08月26日

    这段代码是在 head 插入 script 引入外部脚本然后立即执行,试试去掉这段代码,在 </body> 前插入

    <script src="//static.duoshuo.com/embed.js" async></script>
    
  • 支付宝 API 向导 (Ruby 版),以及开源一个支付宝 gem at 2015年08月25日

    #56 楼 @osbron 顶楼的博客关了,新地址 http://chloerei.com/2013/08/01/alipay-payment-in-ruby/

  • 怎样只用 friendly_id,禁用主键 id at 2015年08月24日

    #12 楼 @peter 情况越复杂,定制程度越高,改 gem 越麻烦。不过你用得爽我也不反对。

  • Ruby 方法的执行结果默认为 “最后一条语句的结果”*3 (重要的事情要说三遍!) at 2015年08月24日

    标题很无聊。

  • gem install pg 遇到的问题 at 2015年08月24日

    #8 楼 @drine 是怎么把 pg 装到那个位置的?

  • 怎样只用 friendly_id,禁用主键 id at 2015年08月24日

    如果你说的是生成 url。

    def to_param
      "#{first_name}-#{last_name}"
    end
    
  • 怎样只用 friendly_id,禁用主键 id at 2015年08月24日

    #8 楼 @peter 定义方法为什么要改 view 和 route?MVC 不就是为了解藕么。

  • 怎样只用 friendly_id,禁用主键 id at 2015年08月24日

    定义一个方法不就好了。

    def find_by_friendly_id(id)
      first_name, last_name = id.split('-')
      find_by! first_name: first_name, last_name: last_name
    end
    
  • Rails 中如何实现登录次数尝试过多锁定十分钟 at 2015年08月24日

    #15 楼 @jasonpu http://guides.ruby-china.org/caching_with_rails.html#activesupport::cache::memcachestore

  • Rails 中如何实现登录次数尝试过多锁定十分钟 at 2015年08月24日

    #7 楼 @nowherekai 用 memcached 或 redis。

  • Rails 中如何实现登录次数尝试过多锁定十分钟 at 2015年08月24日
    def show
      if Rails.cache.increment("login/ip/#{request.ip}",  0, expires_in: 10.minutes).to_i > 3
        render :ip_limit
      else
        # login form
      end
    end
    
    def create
      if Rails.cache.increment("login/ip/#{request.ip}", 1, expires_in: 10.minutes) > 3
        render :ip_limit
      else
        if success
          # login
          Rails.cache.delete("login/ip/#{request.ip}")
        else
          # render :show
        end
      end
    end
    

    补充:

    1. 基于 dalli(memcached)
    2. 读 increament 的值要用 increament 0 https://github.com/mperham/dalli/issues/463
  • Rails 中如何实现登录次数尝试过多锁定十分钟 at 2015年08月24日

    #1 楼 @msg7086

    Rails 的精髓就是:能多用第三方组件的,绝对不要自己写。

    不赞成,看情况。

  • 如何提高 rails server 启动速度? at 2015年08月23日

    https://docs.vagrantup.com/v2/synced-folders/nfs.html

  • 大家好,问一个 Ruby 的基础问题。 at 2015年08月22日

    发代码不要用截图。

  • 请教更简洁的写法 at 2015年08月21日
    class User
      has_many :memberships
      has_many :circles, through: :memberships do
        # Association Extensions
        def status(status)
          where(memberships: { status: status })
        end
      end
    end
    
    class Membership
      belongs_to :user
      belongs_to :circles
    end
    
    class Circle
      has_many :memberships
      has_many :users, through: :memberships
    end
    
    # Association
    User.first.circles.where(memberships: { status: status})
    # Association Extensions
    User.first.circles.status(status)
    
  • 请教更简洁的写法 at 2015年08月21日
    Circle.joins(:memberships).where(memberships: { status: status, user_id: id })
    
  • [广州] (外资) 诺特软件 诚招 Ruby 技术顾问 1 人,Ruby 开发工程师 3 人 at 2015年08月21日

    #2 楼 @gztheknot pass

  • [广州] (外资) 诺特软件 诚招 Ruby 技术顾问 1 人,Ruby 开发工程师 3 人 at 2015年08月21日

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

    请不要包含如“公司美女如云”等不符合技术社区价值观的内容,如果发布类似“急招 Ruby 程序员,QQ 号 xxxxx”这样的马路小广告式的招聘贴,见一个,删一个,决不姑息!

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