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

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

    [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**

  • 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

  • rails-app 7

    A Rails project template lets me start new projects quickly.

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • rails 路由中的 member 和 collection 有何区别? at 2014年07月30日

    你把 resource 改成 resources 就看出不同了。

  • 1 个中文算 2 个字符计算字符串长度 at 2014年07月29日

    #4 楼 @sevk https://twitter.com/a

  • URL 中 %400 错误 at 2014年07月29日

    #4 楼 @yhuiche 普通表单浏览器会转义,客户端提交由客户端转义。

  • 如何让 form_for 中的按钮与外面的按钮在同一列? at 2014年07月29日
    <%= form_for :topic, url: topics_path do |f| %>
    ……
          <%= f.submit value:'Save' %>
          <%= link_to 'Cancel', topics_path, class:'button' %>
    <% end %>
    
  • 如何让 form_for 中的按钮与外面的按钮在同一列? at 2014年07月29日

    #2 楼 @fantast_xue 什么 Template missing,错误信息贴全,别想象我坐在你的电脑旁。

  • 1 个中文算 2 个字符计算字符串长度 at 2014年07月29日

    对啊,为什么要这样做呢?谁在乎?

  • 如何让 form_for 中的按钮与外面的按钮在同一列? at 2014年07月29日

    你先把两个标签挨在一起啊。

  • 8.1~8.3 双节期间电子书七折优惠 at 2014年07月28日

    七夕(たなばた),耶,还真能打出来。

  • 8.1~8.3 双节期间电子书七折优惠 at 2014年07月28日

    Tanabata 是什么?

  • Agile Scrum 的中文叫什么? at 2014年07月28日

    英文才够逼格。

  • 在 rails 里面如何向别的网站发起 post 请求 at 2014年07月28日

    #2 楼 @slim 都行,我估计已经 require 了。

  • 在 rails 里面如何向别的网站发起 post 请求 at 2014年07月28日

    https://www.ruby-toolbox.com/categories/http_clients

  • Font Awesome 4.1.0 加了几个 SNS 分享可用的图标 at 2014年07月27日

    #4 楼 @chairy11 http://www.piedpiper.com/#hello

  • 问下大家是怎么安装 Redis 的?通过 apt 还是源码编译? at 2014年07月26日

    现在 Ubuntu 14.04 官方源的是 2.8.4,够新了吧。

  • 在 Rails 的 Model 中定义 method_missing 覆盖了 AR 默认的肿么办…… at 2014年07月26日

    #11 楼 @billy

    If you are using Rails 4 you don't need this gem as ActiveRecord 4 provides HStore type support out of the box.

  • 在 Rails 的 Model 中定义 method_missing 覆盖了 AR 默认的肿么办…… at 2014年07月26日

    #7 楼 @cassiuschen "self.exif[$`] = a[0]" 你自己知道的嘛……

  • 在 Rails 的 Model 中定义 method_missing 覆盖了 AR 默认的肿么办…… at 2014年07月26日

    #7 楼 @cassiuschen hstore 映射过来是 Hash,所以应该像 Hash 那样用。

  • 在 Rails 的 Model 中定义 method_missing 覆盖了 AR 默认的肿么办…… at 2014年07月26日

    #4 楼 @cassiuschen 不是 hstore 么。

  • 在 Rails 的 Model 中定义 method_missing 覆盖了 AR 默认的肿么办…… at 2014年07月26日

    #3 楼 @cassiuschen

    大概这样

    def method_missing(m,*a)  
      if has_attributes? m
        super
      else
        # code here
      end
    end 
    

    method_missing 很难 debug,建议避免。

  • 在 Rails 的 Model 中定义 method_missing 覆盖了 AR 默认的肿么办…… at 2014年07月26日

    你还是 image.exif[name] 这样用吧。

  • 在 Rails 的 Model 中定义 method_missing 覆盖了 AR 默认的肿么办…… at 2014年07月26日

    AR 的 method_missing 会先判断有没有这个 方法,没有才生成。

  • 请教一个 Linode 的问题 at 2014年07月25日

    按照教程配置了 iptable 等

    你说这个谁懂啊。

  • 写 Rails 请遵循 Sandi Metz 的规则 at 2014年07月25日

    👎

  • 如何在 AR 的 before_create 之类的回调函数中加参数? at 2014年07月24日

    #4 楼 @realwol 写在 controller。

  • 如何以正确的姿势传一个 hash 参数 at 2014年07月23日

    #2 楼 @dongqs 调用方法方不关心哪些参数是这个方法处理,哪些参数是方法里面调用其他方法处理。

  • 新手问题 undefined method at 2014年07月23日

    #4 楼 @angusouyang 书有错误。

  • CSS 渲染效果失败的问题 at 2014年07月22日

    对了有中文版 http://guides.ruby-china.org/asset_pipeline.html

  • CSS 渲染效果失败的问题 at 2014年07月21日

    如果你是启动了 production 环境,那么正常情况静态文件应该经过编译,文件名带上指纹字符串。把一楼链接看一遍。

  • CSS 渲染效果失败的问题 at 2014年07月21日

    你看生成的页面源码一不一样?

    http://guides.rubyonrails.org/asset_pipeline.html

  • 启动 rails server 命令,时好时坏~囧,求病根在哪! at 2014年07月21日

    从提示信息看,sample_app 的 Gemfile 里面指定了 ruby 版本,而 rvm 读取了这个信息,于是切换到了这个 ruby 版本,但是 rvm 没有安装这个 ruby 版本或者这个 ruby 版本没有安装 rails。

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