diff options
author | Bogdan Gusiev <agresso@gmail.com> | 2012-02-03 17:57:53 +0200 |
---|---|---|
committer | Bogdan Gusiev <agresso@gmail.com> | 2012-02-03 17:57:53 +0200 |
commit | 766195563469ce8c081a0937974e3cd2bb84f107 (patch) | |
tree | e4b70359ffbdd876d82376f7e8a48ac46a7cd744 /actionpack | |
parent | 2abaa19e77d1097730cfa6e0924ee7c1660ac01f (diff) | |
download | rails-766195563469ce8c081a0937974e3cd2bb84f107.tar.gz rails-766195563469ce8c081a0937974e3cd2bb84f107.tar.bz2 rails-766195563469ce8c081a0937974e3cd2bb84f107.zip |
AS::Callbacks: :skip_after_callbacks_if_terminated option
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/abstract_controller/callbacks.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/actionpack/lib/abstract_controller/callbacks.rb b/actionpack/lib/abstract_controller/callbacks.rb index fffe3edac2..304b4ab817 100644 --- a/actionpack/lib/abstract_controller/callbacks.rb +++ b/actionpack/lib/abstract_controller/callbacks.rb @@ -8,7 +8,7 @@ module AbstractController include ActiveSupport::Callbacks included do - define_callbacks :process_action, :terminator => "response_body" + define_callbacks :process_action, :terminator => "response_body", :skip_after_callbacks_if_terminated => true end # Override AbstractController::Base's process_action to run the @@ -167,7 +167,6 @@ module AbstractController # for details on the allowed parameters. def #{filter}_filter(*names, &blk) # def before_filter(*names, &blk) _insert_callbacks(names, blk) do |name, options| # _insert_callbacks(names, blk) do |name, options| - options[:if] = (Array(options[:if]) << "!halted") if #{filter == :after} # options[:if] = (Array(options[:if]) << "!halted") if false set_callback(:process_action, :#{filter}, name, options) # set_callback(:process_action, :before, name, options) end # end end # end @@ -176,7 +175,6 @@ module AbstractController # for details on the allowed parameters. def prepend_#{filter}_filter(*names, &blk) # def prepend_before_filter(*names, &blk) _insert_callbacks(names, blk) do |name, options| # _insert_callbacks(names, blk) do |name, options| - options[:if] = (Array(options[:if]) << "!halted") if #{filter == :after} # options[:if] = (Array(options[:if]) << "!halted") if false set_callback(:process_action, :#{filter}, name, options.merge(:prepend => true)) # set_callback(:process_action, :before, name, options.merge(:prepend => true)) end # end end # end |