1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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.
This commit is contained in:
Nick Pellant 2014-07-07 00:10:45 +01:00
parent 2f716694f2
commit b64d887028

View file

@ -566,7 +566,7 @@ module ActiveSupport
# #
# set_callback :save, :before, :before_meth # set_callback :save, :before, :before_meth
# set_callback :save, :after, :after_meth, if: :condition # 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+, # The second arguments indicates whether the callback is to be run +:before+,
# +:after+, or +:around+ the event. If omitted, +:before+ is assumed. This # +:after+, or +:around+ the event. If omitted, +:before+ is assumed. This