aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/callbacks.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@plataformatec.com.br>2012-09-06 07:26:39 -0700
committerJosé Valim <jose.valim@plataformatec.com.br>2012-09-06 07:26:39 -0700
commite8c9f0513da0fac45ba585cf62739da57603f4ed (patch)
treef14cd9f50335adce12ce8018c8984953ea5fbb69 /activesupport/lib/active_support/callbacks.rb
parent2ed325a3e90fc17c2d52a26bd1799b5f4e4bdf88 (diff)
parent8b0d5bfc77ee5d8a69f4a2121b459a7552654314 (diff)
downloadrails-e8c9f0513da0fac45ba585cf62739da57603f4ed.tar.gz
rails-e8c9f0513da0fac45ba585cf62739da57603f4ed.tar.bz2
rails-e8c9f0513da0fac45ba585cf62739da57603f4ed.zip
Merge pull request #7542 from aaronrenner/patch-2
Fixed around callback with lambda example
Diffstat (limited to 'activesupport/lib/active_support/callbacks.rb')
-rw-r--r--activesupport/lib/active_support/callbacks.rb2
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