From b883595e55c1cd6b5bc3ee697d5a8e2c9bc2ab1a Mon Sep 17 00:00:00 2001 From: Aaron Renner Date: Thu, 6 Sep 2012 08:25:58 -0600 Subject: Fixed non-working around callback example --- activesupport/lib/active_support/callbacks.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport') 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 -- cgit v1.2.3