Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
Rei
@Rei
Admin
NO. 1 / 2011-10-28

[email protected]
深圳
182 Topics / 9132 Replies
727 Followers
0 Following
11 Favorites
中下水平 Rails 程序员
Reward
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
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • Git pull 强制覆盖本地文件,命令是什么啊? at April 10, 2012

    用法有问题,Gemfile.lock 变更了就 commit 进去阿

  • 给 Mongoid 加上 find_by_xxx 方法 at April 09, 2012

    这个实现确实不如 ActiveRecord 里面那个,AR 的实现是第一次使用这个方法的时候用 define_method 生成一个,以后就是普通方法调用了。

  • 怎么开始写前台的代码? at April 09, 2012

    bootstrap 的定制难度很大,就像交给你颜料把一副现成的画涂成另一个

    compass 看了下文档,api 太庞大了

    证明懂 CSS 得空白起家

  • 关于酷站:我提交的两个网站,我把分类看错了。现在在 Ruby 社区里面,麻烦帮我改到国内商业网站 at April 09, 2012

    改好了

  • ruby 所谓方法和消息怎么理解呢? at April 09, 2012

    #3 楼 @jiffies 是的。对象后面加点调用的都是方法。

  • ruby 所谓方法和消息怎么理解呢? at April 08, 2012

    抽象概念而已,来源于 smalltalk,其实怎么说都可以。

    ruby 有个方法 send,可以这样调用一个方法

    foo.new.send :bar

    如果理解为消息就觉得这个方法很贴切了。

  • 设计 API 时,有时候很困扰 at April 08, 2012

    我觉得返回空数组好,这样调用的时候就不用判断 nil? 了,直接用数组的方法

  • rvm 新域名 at April 08, 2012

    #3 楼 @ery 我才看明白,之前都不知道什么意思

  • 请教,如何缩短整体测试的运行时间? at April 08, 2012

    #20 楼 @xds2000 #21 楼 @bluecoda 想到个问题,Ruby 版本是多少

  • rvm 新域名 at April 08, 2012

    我才知道。好域名

  • 请教:自定义字段问题 (解决方案) at April 07, 2012

    #5 楼 @robertyu 有不同,不需要 filed1_id 这个字段呀

    {
      _id: 'xxx',
      filed_1: value_1,
      filed_2: value_2,
      ...
    }
    
    

    其实这就是原生的 mongodb 工作模式

  • 请教:自定义字段问题 (解决方案) at April 07, 2012

    #3 楼 @robertyu 看 2 楼

  • 请教:自定义字段问题 (解决方案) at April 07, 2012

    原来是 mongodb 节点

    mongodb 的单个文档完全可以当作一个 Hash 用,用 mongoid 可以这样操作

    class Document
      include Mongoid::Document
    end
    
    doc = Document.new
    doc['one'] = 1
    doc['two'] = [1, 2, 3]
    doc.save
    
    
    
    
  • 请教:自定义字段问题 (解决方案) at April 07, 2012

    自定义字段是通用的还是单个文档内可用?

  • 请教,如何缩短整体测试的运行时间? at April 07, 2012

    rake -t 看看是不是 test:prepare 慢

    方案 http://codecampo.com/topics/154#reply-1663

  • 大家觉得有必要为节点增加 slug 功能吗? at April 07, 2012

    #7 楼 @kevinhua 一条条指定了,resources 应该不能指定根路径和更改:id 变量名称

    get '/:slug/edit' => 'node#edit', :as => :edit_node
    put '/:slug' => 'node#update'
    
    
    
    

    slug/new 如果 slug 是动态的话没法给 form 使用吧。

  • 大家觉得有必要为节点增加 slug 功能吗? at April 06, 2012

    #5 楼 @kevinhua node 应该只有后台编辑权吧,用普通的 resources 路由

  • 大家觉得有必要为节点增加 slug 功能吗? at April 06, 2012

    要用 slug 做 url,做成这样就行了

    get '/:slug' => 'topics#node', :as => :node
    
    

    调用的时候 node_path(:slug => 'xxx')

  • 大家觉得有必要为节点增加 slug 功能吗? at April 06, 2012

    反对,占用第一层路径会对后续开发造成重名阻碍。

    而且没必要用 each 生成那么多路由

  • ruby-china 中,Model Notification::Base 中 store_in :notifications 是什么意思 at April 05, 2012

    因为 Notification::Base 默认应该是 notification_bases 之类的,不太美观

  • 接下来需要完善的功能 at April 05, 2012

    #22 楼 @ruby_sky 这个想法已经废弃了,4 个月前的老帖不要挖了吧

  • 大家一般怎么写动态查询 at April 05, 2012

    post.comments.where(:name => 'xxx')

  • 如何提高自己的自制力? at April 04, 2012

    说起来我是个没自制力的人

    想玩吉他阿……好!去买 想看写代码……好!翘课写代码 想去北京……好!买机票

    Just fun.

  • 从 0 开始学编程,请大家帮忙推荐些书吧 at April 04, 2012

    #2 楼 @bony #3 楼 @cqpx 不同意。

  • 请大家介绍一下你们前端表单验证的方案 at April 03, 2012

    https://github.com/bcardarella/client_side_validations 这个 gem 是可扩展的,内置常用校验,可以写自己的前端校验规则(对应自定义校验)

    校验肯定是写 model 了。

  • rake assets:precompile isn't precompiled scss at April 03, 2012

    projects.css.scss 放出来看看

  • 推荐一个 multi select 多选框插件吧 at April 03, 2012

    http://harvesthq.github.com/chosen/

  • Ruby 纪念 T-Shirt 设计反馈 at April 03, 2012

    额……这设计太简单粗暴了

  • 编写一个好的网站,要学什么 at April 03, 2012

    #2 楼 @413472212 HTML&CSS http://htmldog.com/

  • 两种方式的验证,其中一种不起作用 at April 02, 2012

    #6 楼 @douya0808 第 2 本中文版也是 700+,可能第 4 真的薄了吧,而且中文版排版很挤

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