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:
parent
2f716694f2
commit
b64d887028
|
@ -566,7 +566,7 @@ module ActiveSupport
|
|||
#
|
||||
# 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
|
||||
|
|
Loading…
Reference in New Issue