aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal
diff options
context:
space:
mode:
authorMehmet Emin INAC <mehmetemininac@gmail.com>2017-02-20 18:10:28 +0100
committerMehmet Emin INAC <mehmetemininac@gmail.com>2017-02-20 18:10:28 +0100
commitca7799861982e89d1dfc8a06f369b921edccddfa (patch)
tree0f9866003eb5c37d5042478af73aa0a05c4793df /actionpack/lib/action_controller/metal
parent6c520b75286aa5969de427c5aa417061bd7c58bc (diff)
downloadrails-ca7799861982e89d1dfc8a06f369b921edccddfa.tar.gz
rails-ca7799861982e89d1dfc8a06f369b921edccddfa.tar.bz2
rails-ca7799861982e89d1dfc8a06f369b921edccddfa.zip
Use `response#location` instead of `#location` in redirect.
Closes #28033
Diffstat (limited to 'actionpack/lib/action_controller/metal')
-rw-r--r--actionpack/lib/action_controller/metal/redirecting.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal/redirecting.rb b/actionpack/lib/action_controller/metal/redirecting.rb
index 4dfcf4da28..a349841082 100644
--- a/actionpack/lib/action_controller/metal/redirecting.rb
+++ b/actionpack/lib/action_controller/metal/redirecting.rb
@@ -56,7 +56,7 @@ module ActionController
self.status = _extract_redirect_to_status(options, response_status)
self.location = _compute_redirect_to_location(request, options)
- self.response_body = "<html><body>You are being <a href=\"#{ERB::Util.unwrapped_html_escape(location)}\">redirected</a>.</body></html>"
+ self.response_body = "<html><body>You are being <a href=\"#{ERB::Util.unwrapped_html_escape(response.location)}\">redirected</a>.</body></html>"
end
# Redirects the browser to the page that issued the request (the referrer)