aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
authorTobias Lütke <tobias.luetke@gmail.com>2007-05-22 19:17:43 +0000
committerTobias Lütke <tobias.luetke@gmail.com>2007-05-22 19:17:43 +0000
commit19fbd84e126e77fccafbca06d3b8e9723de492cb (patch)
treef58f367d1c71445616b70162979c9b35111cf644 /actionpack/lib/action_controller
parent4611d0e1081713821053006061616d2baeb3e3ee (diff)
downloadrails-19fbd84e126e77fccafbca06d3b8e9723de492cb.tar.gz
rails-19fbd84e126e77fccafbca06d3b8e9723de492cb.tar.bz2
rails-19fbd84e126e77fccafbca06d3b8e9723de492cb.zip
Rescuing in around_filters works as expected again [codahale, Stephan Kaes]. Closes #8341
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6810 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r--actionpack/lib/action_controller/filters.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/filters.rb b/actionpack/lib/action_controller/filters.rb
index 58f0ca491d..5705960eb5 100644
--- a/actionpack/lib/action_controller/filters.rb
+++ b/actionpack/lib/action_controller/filters.rb
@@ -713,6 +713,11 @@ module ActionController #:nodoc:
perform_action_without_filters unless performed? || aborted
return index if aborted || nesting != 0
+ # if an around filter catches an exception during rendering and handles it, e.g.
+ # by rendering an error page, we might have left over around filters in the filter
+ # chain. so skip over these.
+ index = index.next while (filter = chain[index]) && filter.type == :around
+
# run after filters, if any
while chain[index]
filter, index = skip_excluded_filters(chain, index)