diff options
author | Claudio B. <claudiob@users.noreply.github.com> | 2015-08-08 13:40:39 -0700 |
---|---|---|
committer | Claudio B. <claudiob@users.noreply.github.com> | 2015-08-08 13:40:39 -0700 |
commit | 6e21494ac66897f9a3c5f1f6f4ec6f2c9a628c8e (patch) | |
tree | d8791dc041d3fb014c049143a7d9db85f36abdff /activesupport/lib | |
parent | 175d8acf43acd8f540296e87180f7965b6011db5 (diff) | |
parent | 6a178971787a37d91adc6955d3b9c31fc76d8cc8 (diff) | |
download | rails-6e21494ac66897f9a3c5f1f6f4ec6f2c9a628c8e.tar.gz rails-6e21494ac66897f9a3c5f1f6f4ec6f2c9a628c8e.tar.bz2 rails-6e21494ac66897f9a3c5f1f6f4ec6f2c9a628c8e.zip |
Merge pull request #21173 from repinel/fix-callback-terminator-docs
[ci skip] Fix the AS::Callbacks terminator docs
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. |