From e537de00d806368f21cc22bde118fb90c1b6fe2d Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Wed, 27 Sep 2006 04:55:44 +0000 Subject: 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 --- actionpack/lib/action_controller/filters.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'actionpack/lib/action_controller') 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) -- cgit v1.2.3