Fix problem where redirecting components can cause an

infinite loop [Rick Olson]

Closes #2654


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2829 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Scott Barron 2005-10-30 13:13:02 +00:00
parent 5500d13dd5
commit 025949102e
3 changed files with 8 additions and 0 deletions

View File

@ -1,5 +1,7 @@
*SVN*
* Fix problem where redirecting components can cause an infinite loop [Rick Olson]
* Added support for the queue option on visual_effect [Thomas Fuchs]
* Update script.aculo.us to V1.5_rc4 [Thomas Fuchs]

View File

@ -805,6 +805,7 @@ module ActionController #:nodoc:
raise "You must assign a template class through ActionController.template_class= before processing a request" unless @@template_class
response.template = self.class.view_class.new(self.class.view_root, {}, self)
response.redirected_to = nil
@performed_render = @performed_redirect = false
end

View File

@ -116,6 +116,11 @@ class ComponentsTest < Test::Unit::TestCase
assert_redirected_to :action => "being_called"
end
def test_component_multiple_redirect_redirects
test_component_redirect_redirects
test_internal_calling
end
def test_component_as_string_redirect_renders_redirecte_action
get :calling_redirected_as_string