aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/response.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/response.rb')
-rwxr-xr-xactionpack/lib/action_controller/response.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/response.rb b/actionpack/lib/action_controller/response.rb
index 84edafd7bf..1d9f6676ba 100755
--- a/actionpack/lib/action_controller/response.rb
+++ b/actionpack/lib/action_controller/response.rb
@@ -28,8 +28,8 @@ module ActionController
charset.blank? ? nil : charset.strip.split("=")[1]
end
- def redirect(to_url, permanently = false)
- self.headers["Status"] = "302 Found" unless headers["Status"] == "301 Moved Permanently"
+ def redirect(to_url, response_status)
+ self.headers["Status"] = response_status
self.headers["Location"] = to_url
self.body = "<html><body>You are being <a href=\"#{to_url}\">redirected</a>.</body></html>"