diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index c57e1ec917d8dcd75948803388afe6f4b3e8a687..08e945fdb804ac459b60a9f03179db2a07ceb779 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Correctly report which filter halted the chain. #6699 [Martin Emde] + * Fix a bug in Routing where a parameter taken from the path of the current request could not be used as a query parameter for the next. Closes #6752. [Nicholas Seckar] * Unrescued ActiveRecord::RecordNotFound responds with 404 instead of 500. [Jeremy Kemper] diff --git a/actionpack/lib/action_controller/filters.rb b/actionpack/lib/action_controller/filters.rb index 113dba05d211caa00ad669d4e4f227ef7a422bc3..9f3d1e58d9507207d6c31a096093a57dddec7cf4 100644 --- a/actionpack/lib/action_controller/filters.rb +++ b/actionpack/lib/action_controller/filters.rb @@ -616,10 +616,7 @@ def self.included(base) end def perform_action_with_filters - #result = perform_filters do - # perform_action_without_filters unless performed? - #end - @before_filter_chain_aborted = (call_filter(self.class.filter_chain, 0) == false) + call_filter(self.class.filter_chain, 0) end def process_with_filters(request, response, method = :perform_action, *arguments) #:nodoc: @@ -640,7 +637,7 @@ def call_filter(chain, index) filter.call(self) do halted = call_filter(chain, index.next) end - halt_filter_chain(filter.filter, :no_yield) if halted == false + halt_filter_chain(filter.filter, :no_yield) if halted == false unless @before_filter_chain_aborted halted end @@ -653,6 +650,7 @@ def halt_filter_chain(filter, reason) logger.info "Filter chain halted as [#{filter.inspect}] returned false." end end + @before_filter_chain_aborted = true return false end