Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
陈若涵
@ruohanc
VIP
NO. 1454 / 2012-03-16

Alibaba-inc
杭州
33 Topics / 586 Replies
15 Followers
2 Following
44 Favorites
其实我是SA..正在学写代码...
GitHub Public Repos
  • ZhongHongHVAC 20

    Python driver for ZhongHong HVAC Controller

  • python_talk_2020 1

  • ruhoh_hosting_server 1

    Closed

  • wxcloudrun-django 0

  • home-assistant 0

    :house_with_garden: Open-source home automation platform running on Python 3

  • nextjs 0

  • aliyun-oss-python-sdk 0

    Aliyun OSS SDK for Python

  • cks_web 0

    给老爸写的简单网站

  • dotfiles 0

  • direnv 0

    Unclutter your .profile

More on GitHub
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • 俺们这也应该搞个 reputation 这样的系统... at May 01, 2012

    #2 楼 @liuhui998 分类?你想说啥

  • 磨 Vim 技术的游戏。 at April 30, 2012

    #1 楼 @reus 应该是 <c-z> 可以打开 pass-through 就可以玩了..

  • gitscore 来排名了 at April 30, 2012

    我果然是菜鸟.... http://gitscore.com/user/crhan

  • 关于 activerecord 的写法,下面有错吗? at April 29, 2012

    嗯..最后问题解决的时候再张贴下问题的原因和解决的办法....有始有终嘛

  • 关于 activerecord 的写法,下面有错吗? at April 29, 2012

    #9 楼 @cdredfox 给 log 看看吧.....或者自己用 pry debug.. 看看 screencast 就能明白基本用法了.. 可以用 bingding.pry 制造断点。在 rails server 的界面里进行调试

  • 莫名的 routes 问题 at April 29, 2012

    #1 楼 @cantin = =~ 最后发现是命名问题...我的 Project 少了一个 S

  • 关于 activerecord 的写法,下面有错吗? at April 29, 2012

    #3 楼 @cdredfox 亲..你不花时间看看发帖的格式..让大家看的更轻松点.....怎么能让别人来帮你搞定你的问题呢......

    你的代码挤成一团。还没有高亮...

  • 关于 activerecord 的写法,下面有错吗? at April 29, 2012

    ..为啥这样判断啊...我看教程里面有这样的写法,你参考一下

    # User.rb
    validates :nick, :uniqueness => true
    validates :email, :uniqueness => true
    
    

    这样子前两行就不用了...

    而且你也应该多贴一点内容,比如你的 model 是怎么设定的。还有具体的 log 是怎么样的。详见 提问的智慧

  • 昨儿个发现 pry 是个好东西, 完全替代了 irb at April 29, 2012

    #11 楼 @yakjuly 好吧好吧..我现在还是直接用 rails c 起的 console..没有尝试过你那种

  • 表单与 mass-assign 的矛盾怎么解决比较优雅 at April 28, 2012

    我在 gitlab 的代码里看到是这样的

    admin = params[:user].delete("admin")
    admin_user = User.new(params[:user])
    admin_user.admin = admin
    admin_user.save!
    
    blablabla
    
    
  • 现在可以发布代码了,用 ``` ``` 包起来 at April 28, 2012

    #18 楼 @aNdReW_Qx - - 有道理...css 的问题...

  • 现在可以发布代码了,用 ``` ``` 包起来 at April 28, 2012

    #7 楼 @nowazhu ..你们这个嵌套是怎么回事...

  • 昨儿个发现 pry 是个好东西, 完全替代了 irb at April 28, 2012

    #8 楼 @yakjuly 嗯..我是新手......reload!有啥问题?

  • 昨儿个发现 pry 是个好东西, 完全替代了 irb at April 28, 2012

    #3 楼 @yakjuly reset 试试看吧..

  • 昨儿个发现 pry 是个好东西, 完全替代了 irb at April 28, 2012

    #1 楼 @yakjuly 你说是像 Rails 那样的 reload! 么?问题说清楚点..我跟他聊的正欢呢...帮你问问好了.....他现在想让我教中文啊哈哈..好有趣..

  • 学习 Rails 碰到了找不到文档的问题..或者是我不会找 at April 28, 2012

    #13 楼 @azhao 看完我还去 irc 里面呆了会..结果被第一个作者热情的搭话了..他以为我有什么 feedback 要跟他说..

  • 有个练习 Git 的游戏,Githug at April 28, 2012

    可以去 contribute 一下....比如来个测试 bisect 的..

  • 有个练习 Git 的游戏,Githug at April 28, 2012

    啊哈..还是挺有趣的~~~ 我都会诶 ~~~ 除了 Unified diff 格式没看懂,, 搜到了这里 才明白的

  • [杭州][2012年04月24号] Ruby Tuesday 在大浪 at April 27, 2012

    #29 楼 @bhuztez 需要需要!

    #28 楼 @night_song 不会啊..默认的 prefix 是 /usr/local

  • pry 代替 Rails console 的 irb,不用加进 Gemfile at April 27, 2012

    当然最好再加上 pry-doc...

  • pry 代替 Rails console 的 irb,不用加进 Gemfile at April 27, 2012

    @doitian @AlphaLiu @vkill 不是有 pry-rails 的么..直接在 gemfile 里面加上 gem 'pry-rails', :group => :development 就好了

  • 学习 Rails 碰到了找不到文档的问题..或者是我不会找 at April 27, 2012

    #9 楼 @azhao 瞧瞧楼上...就是这个了!

  • 学习 Rails 碰到了找不到文档的问题..或者是我不会找 at April 27, 2012

    #10 楼 @diudiutang 阿哈哈哈哈~ 有更好的方法~ 用 pry 来代替 irb!

    # rails c
    Loading development environment (Rails 3.2.3)
    [1] pry(main)> stat Project.first
    Method Information:
    --
    Name: first
    Owner: ActiveRecord::Querying
    Visibility: public
    Type: Bound
    Arity: -1
    Method Signature: first(*args, &block)
    Source Location: /usr/local/rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.3/lib/active_record/querying.rb:4
    [2] pry(main)> show-method Project.first
    
    From: /usr/local/rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.3/lib/active_record/querying.rb @ line 4:
    Number of lines: 54
    Owner: ActiveRecord::Querying
    Visibility: public
    
    module Querying
      delegate :find, :first, :first!, :last, :last!, :all, :exists?, :any?, :many?, :to => :scoped
      delegate :first_or_create, :first_or_create!, :first_or_initialize, :to => :scoped
      delegate :destroy, :destroy_all, :delete, :delete_all, :update, :update_all, :to => :scoped
      delegate :find_each, :find_in_batches, :to => :scoped
      delegate :select, :group, :order, :except, :reorder, :limit, :offset, :joins,
               :where, :preload, :eager_load, :includes, :from, :lock, :readonly,
               :having, :create_with, :uniq, :to => :scoped
      delegate :count, :average, :minimum, :maximum, :sum, :calculate, :pluck, :to => :scoped
    
    
  • Vim 游戏 at April 27, 2012

    好玩~的

  • 学习 Rails 碰到了找不到文档的问题..或者是我不会找 at April 27, 2012

    #7 楼 @azhao 最好能有什么方法可以检测某方法来自哪个源文件的定义.....因为类总是被动态的扩展..但又不知道去哪里找 doc..

  • 学习 Rails 碰到了找不到文档的问题..或者是我不会找 at April 26, 2012

    #3 楼 @diudiutang 举例子可不是 API 文档该有的写法吧....而且这一段并不完全..像 :method, :as 就没有写....

    #5 楼 @leekelby 嗯..Ruby 还有 Ruby stdlib 的 API.... Rails 源码暂时还有点..没法看....

  • 学习 Rails 碰到了找不到文档的问题..或者是我不会找 at April 26, 2012

    #1 楼 @Saito 啊..我犯了想当然的错误.....

    原来 seed 方法也是这个 gem 提供的..我看到了....

    后面那个问题咋办捏..

  • 怎么北京没人组织这类活动呢 at April 26, 2012

    @tualatrix 主席...活动起来啊!

  • 如何得到在 attr_accessible 中定义的属性? at April 26, 2012

    几乎没有明白你的问题...难道你要的不就是 self.属性名 么?

  • [杭州][2012年04月24号] Ruby Tuesday 在大浪 at April 26, 2012

    #20 楼 @huacnlee 这个倒不难....无赖点的方法就是直接覆盖系统的 ssh..更加好一点的做法么就是根据现有的 /etc/init.d/ssh 脚本,修改出一个自己的版本,然后用 chkconfig 改一下启动

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