diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-05-22 16:52:54 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-05-22 16:52:54 +0000 |
commit | 060ecf1a2463035b02a8a5a4dba62ee60ee16b8c (patch) | |
tree | af8ef4e1a1e48192dded5a66f506cc731634aa15 /actionpack/lib | |
parent | 2f7c5f84e4834e49001ed565cfe45f14e120613f (diff) | |
download | rails-060ecf1a2463035b02a8a5a4dba62ee60ee16b8c.tar.gz rails-060ecf1a2463035b02a8a5a4dba62ee60ee16b8c.tar.bz2 rails-060ecf1a2463035b02a8a5a4dba62ee60ee16b8c.zip |
Set redirected_to proper
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1352 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 7 |
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 |