Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
@erithair
Member
NO. 15608 / 2014-10-28

0 Topics / 8 Replies
0 Followers
0 Following
22 Favorites
GitHub Public Repos
More on GitHub
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • FactoryGril 生成 model 数量不对 at September 14, 2015

    看一下你对应的测试代码是不是 user 和 user1 只调用过一个。

    Note that let is lazy-evaluated: it is not evaluated until the first time the method it defines is invoked.

    关于 let 和 let!: https://www.relishapp.com/rspec/rspec-core/v/3-3/docs/helper-methods/let-and-let

  • Git 问题来请教下,谢谢大家给看看 at February 14, 2015

    git commit -m "Update a" 细心点啊。。

  • Object 定义的方法求解答 at December 19, 2014
    Object.class # => Class
    Class.superclass.superclass # => Object
    
  • There Is More Than One Way To Do It, Ruby 风格问题 at December 19, 2014

    ruby-style-guide rails-style-guide

  • 请教一个循环问题 while at December 12, 2014

    可以用

    begin
      puts val
      val += 1
    end while val < 0
    

    但是推荐用

    loop do
      puts val
      val += 1
      break unless val < 0
    end
    

    参见ruby-style-guide

  • 数组取出子元素问题 at November 21, 2014

    关于Array#slice an empty array is returned when the starting index for an element range is at the end of the array. Returns nil if the index (or starting index) are out of range. 来源 ruby-doc

  • 为什么要使用 FactoryGirl? at November 07, 2014

    http://stackoverflow.com/questions/5183975/factory-girl-whats-the-purpose 也许可以看看这里面的回答。

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