Permalink
Browse files

Fixed around callback with lambda example

This is a follow up to issue #7535
  • Loading branch information...
1 parent 2ed325a commit 8b0d5bfc77ee5d8a69f4a2121b459a7552654314 @aaronrenner aaronrenner committed Sep 6, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 activesupport/lib/active_support/callbacks.rb
@@ -367,7 +367,7 @@ def __update_callbacks(name, filters = [], block = nil) #:nodoc:
#
# 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

0 comments on commit 8b0d5bf

Please sign in to comment.