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 的分支的? at July 12, 2012

    http://nvie.com/posts/a-successful-git-branching-model/

  • 阻碍 Ruby 普及的因素有哪些? at July 12, 2012

    第一代人,出国了 第二代人,都进了国内大公司关键部门 第三代人,Ruby China 这一波

  • Ruby on Rails 这个名到底有没有科学性? at July 12, 2012

    铁轨上的 Ruby(更快)

  • 真瞎,JRuby 也被墙了!能开个 JRuby 的版块么?或者放在 Languages 下。 at July 12, 2012

    http://ruby-china.org/topics/node54 开好了

  • Confirm by default on delete at July 12, 2012

    good

  • 用户的 Email 居然可以随便修改,太可怕了 at July 12, 2012

    可以试试基于我写的网站开发,没有这个问题 http://codecampo.com/ ,源码 https://github.com/chloerei/code_campo

  • [北京] 盛大创新院 踩点 at July 11, 2012

    场地很好。贵在坚持,看好楼主的活动。👍

    不过我最近肚子没墨水了所以要闭关修炼一段时间暂时不参加。

  • 对 Ruby-China 的一点建议 at July 11, 2012

    #4 楼 @chucai 可以搞些周热门存档,月热门存档。首页老帖多了的话以前已经看过的人会觉得很无趣。

  • 对 Ruby-China 的一点建议 at July 11, 2012

    我反倒觉得老帖子不应该顶上来。

  • 真瞎,JRuby 也被墙了!能开个 JRuby 的版块么?或者放在 Languages 下。 at July 11, 2012

    我觉得不错,等 @huacnlee 拍板。

  • 请教:~> 这个运算符在 ruby 里面是什么含义 at July 10, 2012

    gem "nokogiri", "~> 1.4.2"

    on a version of nokogiri that is >= 1.4.2 but < 1.5.0

  • jruby 有什么优劣?是否适合生产系统 at July 10, 2012

    #4 楼 @azhao ree 已经停止更新了

  • database 中的&defaults 什么意思? at July 10, 2012

    好像指针引用那样,把 defaults 的内容导入 development。

  • 使用过 mongoid 3.0 版本的同学进来看下问题 at July 09, 2012

    #4 楼 @ruby_sky 槽点是不要截图……

  • 使用过 mongoid 3.0 版本的同学进来看下问题 at July 09, 2012

    图片字太小看不清

  • [原创视频] 使用 Emacs 开发 Rails 购物车程序 (一) at July 09, 2012

    #21 楼 @moonjourney 其实你打开 Linux 的终端,Ctrl + p,Ctrl + n,Ctrl + w,都是继承 Emacs 的快捷键。

  • MySQL 中多对多关系怎样进行 Scale at July 08, 2012

    #3 楼 @reducm 垂直拆分是按功能划分,比如新闻和博客都用了 Tag,那么把这两个功能的 Tag 拆开。水平拆分是按照时间段/用户名/其他分区方法把一张表拆开。我不熟拆表,不过看网上的资料说到 SQL 的扩展大都这样。

    #4 楼 @ShiningRay 这篇文章被哪些用户读过一定需要查出全部吗?如果不是,可以做一个小的队列缓存。

  • MySQL 中多对多关系怎样进行 Scale at July 08, 2012

    垂直拆分或者水平拆分

  • Rails 验证显示好难看,要怎么自定义? at July 08, 2012

    #10 楼 @mappings ActionView 自带的 formbuilder 对这里的处理好像不是很好,之前我定制错误的需求也不是很大没深入研究。那个 Proc 就相当于关掉了。

    我发现 simple form 对 error 的处理似乎更好,https://github.com/plataformatec/simple_form/ ,比如做出 twitter bootstrap 的样式 http://blog.plataformatec.com.br/2012/02/simpleform-2-0-bootstrap-for-you-with-love/ ,可以试试。

  • Rails 验证显示好难看,要怎么自定义? at July 08, 2012

    方法一,改样式

    .field_with_errors {display: inline;}
    

    把 field_with_errors 的样式改得不明显。

    方法二,修改或者去掉 ActionView 默认的 error 结构

    在 config/initializers 下面添加一个配置文件,内容是

    ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
      "#{html_tag}".html_safe
    end
    

    这样会去掉多余的 field_with_errors,想定制样式,可以在这个 Proc 里面做手脚或者在 view 里面写逻辑。

  • 生成随机字符串的一行代码 at July 08, 2012

    是不是位数不够?

    我都是用 SecureRandom 模块的方法的。

    > SecureRandom.hex 32
    => "3b47b9639b0da4592a008d58eaf6cbf0894655a73b63874cf6204914a466ff5c"
    
  • Rails 验证显示好难看,要怎么自定义? at July 08, 2012

    楼主是用脚手架吗?实际开发是不会用脚手架的,不过你也可以基于脚手架修改。

    每个 ActiveRecord 对象会有一个 .errors 属性,里面储存了对象校验的结果,类似一个 hash。拿到 errors 数据你可以做任何想要的错误提示样式。

    详情看这里 http://guides.rubyonrails.org/active_record_validations_callbacks.html#working-with-validation-errors

  • 大家外语能力如何? at July 06, 2012

    #89 楼 @jasl 事业部 ruby 组。入职了吗?今天在北戴河啊。

  • 求助:rails 3.26 生成 model 自动生成 attr_accessible 的问题 at July 06, 2012

    可能是 authentications 的 Model 里面也有 attr_accessible

  • 求助:rails 3.26 生成 model 自动生成 attr_accessible 的问题 at July 06, 2012

    #2 楼 @fresh_fish 建议打开,开发的时候麻烦点也好过上线之后暴漏洞。

    4.0 参数白名单有可能移到 contorller。

  • 一个小问题一直困扰我 at July 06, 2012

    1.9 以前 rubygems 不是内置的,而是一个库,需要 require 进来才能继续 require gem。

    1.9 以后内置了 rubygems 了,就不用 require 'rubygems' 了。

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