diff options
author | Aaron Renner <arenner@bayfield.k12.co.us> | 2012-09-06 08:25:58 -0600 |
---|---|---|
committer | Aaron Renner <arenner@bayfield.k12.co.us> | 2012-09-06 08:25:58 -0600 |
commit | b883595e55c1cd6b5bc3ee697d5a8e2c9bc2ab1a (patch) | |
tree | be4bde1898686db4c36da816412ea83f33dd44d1 /activesupport/lib | |
parent | c9d1ba41fd1195d4aaece2a4fc5c83273bd835bd (diff) | |
download | rails-b883595e55c1cd6b5bc3ee697d5a8e2c9bc2ab1a.tar.gz rails-b883595e55c1cd6b5bc3ee697d5a8e2c9bc2ab1a.tar.bz2 rails-b883595e55c1cd6b5bc3ee697d5a8e2c9bc2ab1a.zip |
Fixed non-working around callback example
Diffstat (limited to 'activesupport/lib')
-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 |