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
  • 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

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

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

    #4 楼 @golden05 哈哈,那你很赞同瀑布式开发?

  • 关于 “0 基础” at October 04, 2012

    #8 楼 @knwang 不同人挖不同坑而已,像 6 楼提到的 Rack 和 Sinatra 我就觉得是坑。

  • slim 的问题 at October 03, 2012

    #5 楼 @1272729223 恰好补下知识,对着文档一个个试

  • slim 的问题 at October 03, 2012

    li class=[("active" unless first_photo(@photo)), 'thumb']

  • slim 的问题 at October 03, 2012

    li *{:class => "#{"active" unless first_photo(@photo)} thumb"}

  • slim 的问题 at October 03, 2012

    li class="#{"active" unless first_photo(@photo)} thumb"

  • slim 的问题 at October 03, 2012
    li.thumb class=("active" unless first_photo(@photo))
    
  • unicorn,passenger,thin 分别优势? at October 03, 2012

    #11 楼 @QueXuQ 官网文档就有个链接 http://www.modrails.com/documentation.html

  • 关于 raise 没有被捕捉的问题 at October 02, 2012
    def risky   
      begin
        10.times do    
          explode
        end
        puts "xxx"
      rescue Exception => f 
        puts f.class
      end
    end   
    

    或者

    def risky   
      10.times do    
        explode
      end
      puts "xxx"
    rescue Exception => f 
      puts f.class
    end   
    
  • unicorn,passenger,thin 分别优势? at October 02, 2012

    #8 楼 @QueXuQ #9 楼 @leomao10

    这是 nginx-module。

    standalone 这样装 passenger start

  • [上海] GitCafe 团队继续招全职 Rails 开发 at September 29, 2012

    ...

  • MAC 系统下如何搭建 ROR 开发环境 ??? at September 28, 2012

    我没有 Mac,具体情况不知道了,等 Mac 用户解答。

    新开终端 Ruby 版本不对,那就是没有载入 rvm 环境变量,按官方文档应该会自动插入引用环境变量的那行代码,不过实际情况还要看系统。

    Rails 创建项目的时候会生成基本的项目需要的文件,新建功能的时候可以通过命令初始化文件,里面是空的,往里添加逻辑。未用 Rails 进行过开发会很难理解,因为代码量少到极致,用不用 IDE 其实差不多。

  • unicorn,passenger,thin 分别优势? at September 28, 2012

    #2 楼 @PrideChung 我个人喜好而已。Passenger 可能不是最快,也不符合 *nix 风格,但是简单易用。我觉得越易用的东西越好扩展,一想到 unicorn 和 thin 部署每个应用的时候都要对每个进程发信号我就觉得恐怖。

  • MAC 系统下如何搭建 ROR 开发环境 ??? at September 28, 2012

    参考一下这里 http://ruby-china.org/wiki/install_ruby_guide

    我是用命令行 + gvim 开发的。以前有过 IDE 讨论 http://ruby-china.org/topics/622 可以说五花八门。

  • unicorn,passenger,thin 分别优势? at September 28, 2012

    我就说 passenger 好在哪:管理方便,touch 一下 tmp/restart 就自动重启了,企业版提供滚动重启、异常回退等功能。

  • MAC 系统下如何搭建 ROR 开发环境 ??? at September 28, 2012

    你又不说什么步骤不成功。

  • 关于 ruby 渲染模板比较 at September 27, 2012

    #6 楼 @jiyinyiyong slim 没有浏览器端编译。自动编译是想要怎么用法?我试过要做一个页面模板的时候,在 Rails 项目里面开 guard-livereload 最方便 http://codecampo.com/topics/608

  • 关于 ruby 渲染模板比较 at September 27, 2012

    我的历程 erb -> haml -> slim

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