aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/new_base/redirector.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/new_base/redirector.rb')
-rw-r--r--actionpack/lib/action_controller/new_base/redirector.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/new_base/redirector.rb b/actionpack/lib/action_controller/new_base/redirector.rb
index ff7b74341c..20060b001f 100644
--- a/actionpack/lib/action_controller/new_base/redirector.rb
+++ b/actionpack/lib/action_controller/new_base/redirector.rb
@@ -6,14 +6,14 @@ module ActionController
super(message || DEFAULT_MESSAGE)
end
end
-
+
module Redirector
def redirect_to(url, status) #:doc:
raise AbstractController::DoubleRenderError if response_body
logger.info("Redirected to #{url}") if logger && logger.info?
- response.status = status
- response.location = url.gsub(/[\r\n]/, '')
+ self.status = status
+ self.location = url.gsub(/[\r\n]/, '')
self.response_body = "<html><body>You are being <a href=\"#{CGI.escapeHTML(url)}\">redirected</a>.</body></html>"
end
end
-end \ No newline at end of file
+end