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

[email protected]
深圳
198 Topics / 9208 Replies
732 Followers
0 Following
11 Favorites
中下水平 Rails 程序员
Reward
GitHub Public Repos
  • writings 940

    [Closed] Source code of writings.io

  • alipay 728

    Unofficial alipay ruby gem

  • code_campo 288

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

  • asciidoctor-pdf-cjk-ka... 102

    **no longer maintained**

  • geeknote 39

  • material-ui 17

  • htmlrenderer 12

  • rich-text-editor 12

  • llmrpg 8

  • rails-chatgpt-demo 8

More on GitHub
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • 我认为 Guide 教程里的 “scaffolding” 纯粹是引新人入坑。元芳,你怎么看? at October 16, 2012

    Getting Started with Rails This guide covers getting up and running with Ruby on Rails. After reading it, you should be familiar with:

    • Installing Rails, creating a new Rails application, and connecting your application to a database
    • The general layout of a Rails application
    • The basic principles of MVC (Model, View Controller) and RESTful design
    • How to quickly generate the starting pieces of a Rails application

    我觉得 getting started 的任务已经完成了。想看完 getting started 就开始开发实际应用,我觉得怎么都不可能的。

  • ruby 中如何定位 DAO at October 16, 2012

    #5 楼 @weiwei5987 ActiveRecord 有两个魔法字段 created_at 和 updated_at,如果你的表里面已经有这两个字段,它就会在保存和更新的时候自动填上。

    如果是其他需要自动更新的字段,我会写一个 before_update callback

  • ruby 中如何定位 DAO at October 16, 2012

    继承了 ActiveRecord 之后,Model 里面已经有一堆方法了,比如 Task.create。

    添加新方法可以先放在 Model 里,复杂的跨 Model 的再考虑新添类。

  • 关于 while 的疑问 at October 15, 2012

    楼主格式化代码要这样

    ruby if start_year.to_i > end_year.to_i puts "Starting year should smaller than ending year!" else puts "leap year between " + start_year + " and " + end_year +" :" end

    效果

    if start_year.to_i > end_year.to_i
      puts "Starting year should smaller than ending year!"
    else
      puts "leap year between " + start_year + " and " + end_year +" :"
    end
    
  • 就教:怎么知道一个 method 继承自哪里 class 或 module? at October 15, 2012

    #2 楼 @5long 擦,我才知道

  • 看上去 GemBundler 并没有解决版本冲突的问题啊 at October 15, 2012

    我也脚得应该自动解决

  • 新手不学 rspec 可以吗? at October 14, 2012

    没有明确理由的话不需要用 rspec

  • ruby 如何实现连减 at October 12, 2012

    [1, 2, 3, 4, 5].inject(&:-)

  • if 与 ||=的优先级 at October 12, 2012

    @current_user ||= User.find_by_id(session[:user_id])

    不抛异常版本

  • Ruby 中 i++ 问题? at October 11, 2012

    Matz 可能觉得这个操作不好就不加进来,我也觉得不好。

  • VIM 下 使用 SASS, 保存即可见? at October 11, 2012

    我用 livereload,一边写 sass 一边看浏览器效果。看生成的 css 没什么必要吧。

  • 有靠谱的飞机订票点推荐吗? at October 11, 2012

    携程

  • 什么情况下需要用 redis at October 10, 2012
    1. 希望快速响应的数据
    2. 数据库不方便储存的结构
  • TMD 社区就是牛逼 at October 10, 2012

    我还以为 TMD 是什么新社区……

  • Bitbucket 这次改版后感觉比 Github 好看多了 at October 10, 2012

    被 JIRA 虐得不行,所以对相关服务也没啥好感了。

  • “渲染 xml 和 json 数据” 不太懂 at October 09, 2012

    要 Google 不要百度。

  • Ruby 2.0 的新参数写法 at October 09, 2012

    #17 楼 @sevk 难度没变吧,只是跟以前的定义不兼容了。

    新的不能使用

    # 错误
    def foo(str: "foo", num: 424242, options = {})
      [str, num, options]
    end
    

    options 不能设为 Hash 了。是前面用了命名参数之后不能再设 Hash 参数,还是怎么滴,需要更多说明。如果没有用命名参数(大量现有的库),Hash 参数还能不能用,需不需要改写。

  • Ruby 2.0 的新参数写法 at October 09, 2012

    命名参数确实便利很多

  • 一个比较大的话题,web 何去何从 ? at October 08, 2012

    互补

  • 嘿嘿,渐入佳境…… at October 08, 2012

    #10 楼 @xiaolai http://ruby-china.org/topics/4710 这个简便得多~

  • 求教,请问如何让一些 field 不被 render 出来 at October 08, 2012

    我喜欢 DHH 写的 jbuilder https://github.com/rails/jbuilder

  • 终于把 Rails Tutorial 过了一遍…… at October 08, 2012

    #21 楼 @neaghfoz 大得不得了,印象中就有路由语法改变,页面 helper 去除 RJS,新手很可能碰钉,建议完全按着书上版本练习。

  • 嘿嘿,渐入佳境…… at October 08, 2012

    我也喜欢 MongoDB。

  • DHH 的公开课 at October 07, 2012

    163 画质太低了……

  • DHH 的公开课 at October 07, 2012

    我艹好东西

  • 求空间推荐 at October 06, 2012

    linode 512M

  • 选择 cucumber 还是 rspec request at October 04, 2012

    测试太重,功能就很难改动,开发人员会有惰性。

    Kent Beck 最近说了

    I get paid for code that works, not for tests, so my philosophy is to test as little as possible to reach a given level of confidence

    http://stackoverflow.com/questions/153234/how-deep-are-your-unit-tests

    当然这有很多种理解,不愿写测试的人可能欢呼「测试无用」,我的理解是测试的分量应该能「夹住」易错的地方,但是不要给功能修改带来负担。

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