diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-01-03 17:22:20 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-01-03 17:22:20 -0300 |
commit | 4591b0fc041454f4ba4a83629b9bbca2a851969c (patch) | |
tree | 21b9019ee5d471205ccde051977d3c92b0a4f800 /actionpack/lib | |
parent | 900758145d65438190a69f0fd227f62e01fa7bd2 (diff) | |
parent | 9c65c539e2caa4590aded1975aead008f8135da4 (diff) | |
download | rails-4591b0fc041454f4ba4a83629b9bbca2a851969c.tar.gz rails-4591b0fc041454f4ba4a83629b9bbca2a851969c.tar.bz2 rails-4591b0fc041454f4ba4a83629b9bbca2a851969c.zip |
Merge pull request #17227 from claudiob/explicitly-abort-callbacks
Introduce explicit way of halting callback chains by throwing :abort. Deprecate current implicit behavior of halting callback chains by returning `false` in apps ported to Rails 5.0. Completely remove that behavior in brand new Rails 5.0 apps.
Conflicts:
railties/CHANGELOG.md
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/abstract_controller/callbacks.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/abstract_controller/callbacks.rb b/actionpack/lib/abstract_controller/callbacks.rb index 0d2f18279b..32de82780f 100644 --- a/actionpack/lib/abstract_controller/callbacks.rb +++ b/actionpack/lib/abstract_controller/callbacks.rb @@ -9,7 +9,7 @@ module AbstractController included do define_callbacks :process_action, - terminator: ->(controller,_) { controller.response_body }, + terminator: ->(controller, result_lambda) { result_lambda.call if result_lambda.is_a?(Proc); controller.response_body }, skip_after_callbacks_if_terminated: true end |