Permalink
Browse files

Set redirected_to proper

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1352 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 2f7c5f8 commit 060ecf1a2463035b02a8a5a4dba62ee60ee16b8c @dhh dhh committed May 22, 2005
Showing with 4 additions and 3 deletions.
  1. +4 −3 actionpack/lib/action_controller/base.rb
View
7 actionpack/lib/action_controller/base.rb
@@ -540,19 +540,20 @@ def redirect_to(options = {}, *parameters_for_method_reference) #:doc:
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
redirect_to(request.protocol + request.host_with_port + options)
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

0 comments on commit 060ecf1

Please sign in to comment.