Skip to content
Browse files

Fix ActiveSupport::Callbacks #set_callback docs.

A minor version breakage due to a rewrite of the callbacks code now
requires an explicit block to be passed to #set_callback. This amends
the documentation.
  • Loading branch information...
1 parent 2f71669 commit b64d887028effe6c602cdd200e89e5b1600c8cbb @nickpellant nickpellant committed Jul 7, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 activesupport/lib/active_support/callbacks.rb
View
2 activesupport/lib/active_support/callbacks.rb
@@ -566,7 +566,7 @@ def __update_callbacks(name) #:nodoc:
#
# set_callback :save, :before, :before_meth
# set_callback :save, :after, :after_meth, if: :condition
- # set_callback :save, :around, ->(r, &block) { stuff; result = block.call; stuff }
+ # set_callback :save, :around, ->(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 b64d887

Please sign in to comment.
Something went wrong with that request. Please try again.