aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2012-08-16 00:07:17 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2012-08-16 00:07:17 +0530
commit176f0888d85da38e3ae95f74b419d22e347d7a81 (patch)
tree0a46e2a790cf34785b7e8048e21fb598010e23e8 /activemodel/lib
parentebb4a3d5becd535074502a4bf1b61a5b18e30917 (diff)
parent62499bcb9d8aa65636f5cd3ace2a818ffd4e2f8a (diff)
downloadrails-176f0888d85da38e3ae95f74b419d22e347d7a81.tar.gz
rails-176f0888d85da38e3ae95f74b419d22e347d7a81.tar.bz2
rails-176f0888d85da38e3ae95f74b419d22e347d7a81.zip
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'activemodel/lib')
-rw-r--r--activemodel/lib/active_model/callbacks.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/activemodel/lib/active_model/callbacks.rb b/activemodel/lib/active_model/callbacks.rb
index e669113001..e442455a53 100644
--- a/activemodel/lib/active_model/callbacks.rb
+++ b/activemodel/lib/active_model/callbacks.rb
@@ -38,6 +38,17 @@ module ActiveModel
# # Your code here
# end
#
+ # When defining an around callback remember to yield to the block, otherwise
+ # it won't be executed:
+ #
+ # around_create :log_status
+ #
+ # def log_status
+ # puts 'going to call the block...'
+ # yield
+ # puts 'block successfully called.'
+ # end
+ #
# You can choose not to have all three callbacks by passing a hash to the
# +define_model_callbacks+ method.
#