diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-05-22 07:43:05 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-05-22 07:43:05 +0000 |
commit | 0367317dd62ecd177d57d469a4d57974b75e425b (patch) | |
tree | aea47bdb80239ffdbd43f24387a78bc742b06b72 /actionpack/lib/action_controller/response.rb | |
parent | dab360e18129c8f4916b78d00d49ed9dda5ccd8a (diff) | |
download | rails-0367317dd62ecd177d57d469a4d57974b75e425b.tar.gz rails-0367317dd62ecd177d57d469a4d57974b75e425b.tar.bz2 rails-0367317dd62ecd177d57d469a4d57974b75e425b.zip |
Deprecated redirect_to_path and redirect_to_url in favor of letting redirect_to do the right thing when passed either a path or url. Introduced r as a unified method for render (still under construction)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1349 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/response.rb')
-rwxr-xr-x | actionpack/lib/action_controller/response.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/response.rb b/actionpack/lib/action_controller/response.rb index 2e6c5fcc37..227aa27cc5 100755 --- a/actionpack/lib/action_controller/response.rb +++ b/actionpack/lib/action_controller/response.rb @@ -8,7 +8,7 @@ module ActionController end def redirect(to_url, permanently = false) - @headers["Status"] = permanently ? "301 Moved Permanently" : "302 Found" + @headers["Status"] ||= "302 Found" @headers["location"] = to_url @body = "<html><body>You are being <a href=\"#{to_url}\">redirected</a>.</body></html>" |