aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorCarlos Souza <carloshrsouza@gmail.com>2013-07-12 15:34:52 -0400
committerCarlos Souza <carloshrsouza@gmail.com>2013-07-13 11:00:42 -0400
commitef77d40649b04dff4c935418ef2782c131fc7ef6 (patch)
tree431cdf296f4484175c8e70eff307026f30139f4c /guides
parent3af7b16c114802acdf0c0e7a34837a7a454fd23f (diff)
downloadrails-ef77d40649b04dff4c935418ef2782c131fc7ef6.tar.gz
rails-ef77d40649b04dff4c935418ef2782c131fc7ef6.tar.bz2
rails-ef77d40649b04dff4c935418ef2782c131fc7ef6.zip
Remove block argument from callback example.
[ci skip]
Diffstat (limited to 'guides')
-rw-r--r--guides/source/active_record_callbacks.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/active_record_callbacks.md b/guides/source/active_record_callbacks.md
index 2e70e64b39..df1dd22971 100644
--- a/guides/source/active_record_callbacks.md
+++ b/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
```