Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
@liujianhei
会员
第 10087 位会员 / 2013-11-13

上海
0 篇帖子 / 39 条回帖
0 关注者
0 正在关注
37 收藏
未设置 GitHub 信息。
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • centos crontab 不能运行 ruby script/runner ***.rb 脚本 at 2014年07月04日

    */1 * * * * bash /data/projects/shell/task.sh &> /tmp/task.log

    应该是这样吧

  • centos crontab 不能运行 ruby script/runner ***.rb 脚本 at 2014年07月04日

    */1 * * * * root /data/projects/shell/task.sh &> /tmp/task.log

    看下日志

  • 用 Rails 写了个新 blog at 2014年06月16日

    不错,赞

  • [上海][2014年6月17日] 周中聚会 at 2014年06月09日

    参加😃

  • [上海] [2014年5月13日] 周中聚会 at 2014年05月12日

    #30 楼 @ericguo :thumbsup:

  • [上海] [2014年5月13日] 周中聚会 at 2014年05月09日

    没有特殊情况就参加,我也是第一次

  • RailsTutorial 第 6 章用户模型的问题 at 2013年12月04日
    before do
      user_with_same_email = @user.dup
      user_with_same_email.email = @user.email.upcase
      user_with_same_email.save
    end
    

    这个是第一次保存数据库成功的数据,代码和后面的解释有些不对应,理解要转个弯。

  • RailsTutorial 第 6 章用户模型的问题 at 2013年12月04日
    it { should_not be_valid }
    

    这里的 it 指的是 subject { @user },所以判断的应该是下面的是否有效吧

    @user = User.new(name: "Example User", email: "[email protected]")
    
  • RailsTutorial 第 6 章用户模型的问题 at 2013年12月04日

    我的理解是: 先保存了这个 user

    before do
      user_with_same_email = @user.dup
      user_with_same_email.email = @user.email.upcase
      user_with_same_email.save
    end
    

    然后判断下面的 user 是否重复

    before do
      @user = User.new(name: "Example User", email: "[email protected]")
    end
    
  • 上一页
  • 1
  • 2
关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English