aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller')
-rwxr-xr-xactionpack/lib/action_controller/base.rb7
1 files changed, 4 insertions, 3 deletions
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