diff options
Diffstat (limited to 'actionpack/lib/action_controller/response.rb')
-rwxr-xr-x | actionpack/lib/action_controller/response.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/response.rb b/actionpack/lib/action_controller/response.rb index 836dd5ffef..a574fbca75 100755 --- a/actionpack/lib/action_controller/response.rb +++ b/actionpack/lib/action_controller/response.rb @@ -7,8 +7,8 @@ module ActionController @body, @headers, @session, @assigns = "", DEFAULT_HEADERS.merge("cookie" => []), [], [] end - def redirect(to_url) - @headers["Status"] = "302 Moved" + def redirect(to_url, permanently = false) + @headers["Status"] = permanently ? "301 Moved Permanently" : "302 Found" @headers["location"] = to_url end end |