diff options
author | Aaron Renner <aaron.renner@gmail.com> | 2012-09-06 08:21:47 -0600 |
---|---|---|
committer | Aaron Renner <aaron.renner@gmail.com> | 2012-09-06 08:21:47 -0600 |
commit | 8b0d5bfc77ee5d8a69f4a2121b459a7552654314 (patch) | |
tree | f14cd9f50335adce12ce8018c8984953ea5fbb69 /activesupport | |
parent | 2ed325a3e90fc17c2d52a26bd1799b5f4e4bdf88 (diff) | |
download | rails-8b0d5bfc77ee5d8a69f4a2121b459a7552654314.tar.gz rails-8b0d5bfc77ee5d8a69f4a2121b459a7552654314.tar.bz2 rails-8b0d5bfc77ee5d8a69f4a2121b459a7552654314.zip |
Fixed around callback with lambda example
This is a follow up to issue #7535
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/callbacks.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index 3f7d0e401a..a55f68497c 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -367,7 +367,7 @@ module ActiveSupport # # set_callback :save, :before, :before_meth # set_callback :save, :after, :after_meth, :if => :condition - # set_callback :save, :around, lambda { |r| stuff; result = yield; stuff } + # set_callback :save, :around, lambda { |r, &block| stuff; result = block.call; stuff } # # The second arguments indicates whether the callback is to be run +:before+, # +:after+, or +:around+ the event. If omitted, +:before+ is assumed. This |