diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-12-12 22:26:37 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-12-12 22:26:37 +0000 |
commit | 2f184c338b6379baecde8c882f72c4fa806a3a0b (patch) | |
tree | 7e52c390b431f67f70d4da4bf9e24fc2b9127115 /actionpack | |
parent | 55d4dbb8df9b4e6e46d461352f97e35ba69b417e (diff) | |
download | rails-2f184c338b6379baecde8c882f72c4fa806a3a0b.tar.gz rails-2f184c338b6379baecde8c882f72c4fa806a3a0b.tar.bz2 rails-2f184c338b6379baecde8c882f72c4fa806a3a0b.zip |
Correctly report which filter halted the chain. References #6699.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5715 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/CHANGELOG | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/filters.rb | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index c57e1ec917..08e945fdb8 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 113dba05d2..9f3d1e58d9 100644 --- a/actionpack/lib/action_controller/filters.rb +++ b/actionpack/lib/action_controller/filters.rb @@ -616,10 +616,7 @@ module ActionController #:nodoc: 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 @@ module ActionController #:nodoc: 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 @@ module ActionController #:nodoc: logger.info "Filter chain halted as [#{filter.inspect}] returned false." end end + @before_filter_chain_aborted = true return false end |