From 8b0d5bfc77ee5d8a69f4a2121b459a7552654314 Mon Sep 17 00:00:00 2001 From: Aaron Renner Date: Thu, 6 Sep 2012 08:21:47 -0600 Subject: Fixed around callback with lambda example This is a follow up to issue #7535 --- activesupport/lib/active_support/callbacks.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib/active_support/callbacks.rb') 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