diff options
author | Roque Pinel <repinel@gmail.com> | 2015-08-08 13:36:13 -0400 |
---|---|---|
committer | Roque Pinel <repinel@gmail.com> | 2015-08-08 13:40:33 -0400 |
commit | 6a178971787a37d91adc6955d3b9c31fc76d8cc8 (patch) | |
tree | 4e3251d9ba1391be98abcdbdba0f59a7a8ec8733 /activesupport/lib | |
parent | 286cb890de8bbb01559683a3715387de2cb0af5f (diff) | |
download | rails-6a178971787a37d91adc6955d3b9c31fc76d8cc8.tar.gz rails-6a178971787a37d91adc6955d3b9c31fc76d8cc8.tar.bz2 rails-6a178971787a37d91adc6955d3b9c31fc76d8cc8.zip |
[ci skip] Fix the AS::Callbacks terminator docs
The second argument of the terminator lambda is no longer the result
of the callback, but the result lambda.
https://github.com/rails/rails/blob/3a7609e2bafee4b071fe35136274e6ccbae8cacd/activesupport/test/callbacks_test.rb#L553
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/callbacks.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index f35e1f5098..fefba5b0fd 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -741,10 +741,10 @@ module ActiveSupport # callback chain, preventing following before and around callbacks from # being called and the event from being triggered. # This should be a lambda to be executed. - # The current object and the return result of the callback will be called - # with the lambda. + # The current object and the result lambda of the callback will be provided + # to the terminator lambda. # - # define_callbacks :validate, terminator: ->(target, result) { result == false } + # define_callbacks :validate, terminator: ->(target, result_lambda) { result_lambda.call == false } # # In this example, if any before validate callbacks returns +false+, # any successive before and around callback is not executed. |