diff options
author | Nick Pellant <nick@nickpellant.com> | 2014-07-07 00:10:45 +0100 |
---|---|---|
committer | Nick Pellant <nick@nickpellant.com> | 2014-07-07 00:10:45 +0100 |
commit | b64d887028effe6c602cdd200e89e5b1600c8cbb (patch) | |
tree | b7219019eeacf9362ff95481282f78eee7def80c /activesupport/lib | |
parent | 2f716694f20cd19464029513fb59440fd9000840 (diff) | |
download | rails-b64d887028effe6c602cdd200e89e5b1600c8cbb.tar.gz rails-b64d887028effe6c602cdd200e89e5b1600c8cbb.tar.bz2 rails-b64d887028effe6c602cdd200e89e5b1600c8cbb.zip |
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.
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/callbacks.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index cc007bd27e..cd467e13f6 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -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 |