diff options
author | José Valim <jose.valim@plataformatec.com.br> | 2012-09-06 07:26:39 -0700 |
---|---|---|
committer | José Valim <jose.valim@plataformatec.com.br> | 2012-09-06 07:26:39 -0700 |
commit | e8c9f0513da0fac45ba585cf62739da57603f4ed (patch) | |
tree | f14cd9f50335adce12ce8018c8984953ea5fbb69 | |
parent | 2ed325a3e90fc17c2d52a26bd1799b5f4e4bdf88 (diff) | |
parent | 8b0d5bfc77ee5d8a69f4a2121b459a7552654314 (diff) | |
download | rails-e8c9f0513da0fac45ba585cf62739da57603f4ed.tar.gz rails-e8c9f0513da0fac45ba585cf62739da57603f4ed.tar.bz2 rails-e8c9f0513da0fac45ba585cf62739da57603f4ed.zip |
Merge pull request #7542 from aaronrenner/patch-2
Fixed around callback with lambda example
-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 |