diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2012-08-16 00:07:17 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2012-08-16 00:07:17 +0530 |
commit | 176f0888d85da38e3ae95f74b419d22e347d7a81 (patch) | |
tree | 0a46e2a790cf34785b7e8048e21fb598010e23e8 /activemodel/lib | |
parent | ebb4a3d5becd535074502a4bf1b61a5b18e30917 (diff) | |
parent | 62499bcb9d8aa65636f5cd3ace2a818ffd4e2f8a (diff) | |
download | rails-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.rb | 11 |
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. # |