From 060ecf1a2463035b02a8a5a4dba62ee60ee16b8c Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 22 May 2005 16:52:54 +0000 Subject: Set redirected_to proper git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1352 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/base.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'actionpack/lib/action_controller') diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 696bc14292..aad581b8e7 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -540,7 +540,8 @@ module ActionController #:nodoc: when %r{^\w+://.*} raise DoubleRenderError, "Can only render or redirect once per action" if performed? logger.info("Redirected to #{options}") unless logger.nil? - @response.redirect(options) + response.redirect(options) + response.redirected_to = options @performed_redirect = true when String @@ -548,11 +549,11 @@ module ActionController #:nodoc: else if parameters_for_method_reference.empty? - response.redirected_to = options redirect_to(url_for(options)) + response.redirected_to = options else - response.redirected_to, response.redirected_to_method_params = options, parameters_for_method_reference redirect_to(url_for(options, *parameters_for_method_reference)) + response.redirected_to, response.redirected_to_method_params = options, parameters_for_method_reference end end end -- cgit v1.2.3