diff options
author | Rick Olson <technoweenie@gmail.com> | 2006-09-27 04:55:44 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2006-09-27 04:55:44 +0000 |
commit | e537de00d806368f21cc22bde118fb90c1b6fe2d (patch) | |
tree | f9ca6bac9e371238a10b385a1069576d26685cd8 /actionpack/lib/action_controller | |
parent | 6a8dcc8a5bd9e8510c75d7a88a1072d88067aaa9 (diff) | |
download | rails-e537de00d806368f21cc22bde118fb90c1b6fe2d.tar.gz rails-e537de00d806368f21cc22bde118fb90c1b6fe2d.tar.bz2 rails-e537de00d806368f21cc22bde118fb90c1b6fe2d.zip |
Fix bug that kept any before_filter except the first one from being able to halt the before_filter chain. [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5196 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/filters.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/actionpack/lib/action_controller/filters.rb b/actionpack/lib/action_controller/filters.rb index 9569672bee..124df970ed 100644 --- a/actionpack/lib/action_controller/filters.rb +++ b/actionpack/lib/action_controller/filters.rb @@ -629,13 +629,12 @@ module ActionController #:nodoc: filter = chain[index] return call_filter(chain, index.next) if filter.excluded_from?(action_name) - called = false + halted = false filter.call(self) do - call_filter(chain, index.next) - called = true + halted = call_filter(chain, index.next) end - halt_filter_chain(filter.filter, :no_yield) if called == false - called + halt_filter_chain(filter.filter, :no_yield) if halted == false + halted end def halt_filter_chain(filter, reason) |