Browse files

Merge pull request #11413 from envylabs/master

Remove block argument from callback example. [ci skip]
  • Loading branch information...
2 parents 6878d49 + ef77d40 commit 2840b4436ea57c6ffdc966f5c18108dfdf43ac8e @senny senny committed Jul 13, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 guides/source/active_record_callbacks.md
View
4 guides/source/active_record_callbacks.md
@@ -49,8 +49,8 @@ The macro-style class methods can also receive a block. Consider using this styl
class User < ActiveRecord::Base
validates :login, :email, presence: true
- before_create do |user|
- user.name = user.login.capitalize if user.name.blank?
+ before_create do
+ self.name = login.capitalize if name.blank?
end
end
```

0 comments on commit 2840b44

Please sign in to comment.