1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove block argument from callback example.

[ci skip]
This commit is contained in:
Carlos Souza 2013-07-12 15:34:52 -04:00
parent 3af7b16c11
commit ef77d40649

View file

@ -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
```