aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2015-12-18 07:47:30 +0100
committerKasper Timm Hansen <kaspth@gmail.com>2015-12-18 07:47:30 +0100
commite5ea82b52d7df8053cb289b81d3081dfe602a3e6 (patch)
tree0753f408bd9887a0c49b1dd0ff8aeee7b99e063a
parentd00f15b8ae10a5e43e33509debf58811e7ac46e7 (diff)
parent91e3aa194293e3211177922123e20d800e878d76 (diff)
downloadrails-e5ea82b52d7df8053cb289b81d3081dfe602a3e6.tar.gz
rails-e5ea82b52d7df8053cb289b81d3081dfe602a3e6.tar.bz2
rails-e5ea82b52d7df8053cb289b81d3081dfe602a3e6.zip
Merge pull request #22649 from derekprior/dp-redirect-back-docs
Document when fallback_location is used [ci-skip]
-rw-r--r--actionpack/lib/action_controller/metal/redirecting.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/metal/redirecting.rb b/actionpack/lib/action_controller/metal/redirecting.rb
index aeecb48f85..513f0bc7e1 100644
--- a/actionpack/lib/action_controller/metal/redirecting.rb
+++ b/actionpack/lib/action_controller/metal/redirecting.rb
@@ -68,8 +68,14 @@ module ActionController
self.response_body = "<html><body>You are being <a href=\"#{ERB::Util.unwrapped_html_escape(location)}\">redirected</a>.</body></html>"
end
- # Redirects the browser to the page that issued the request if possible,
- # otherwise redirects to provided default fallback location.
+ # Redirects the browser to the page that issued the request (the referrer)
+ # if possible, otherwise redirects to the provided default fallback
+ # location.
+ #
+ # The referrer information is pulled from the HTTP `Referer` (sic) header on
+ # the request. This is an optional header and its presence on the request is
+ # subject to browser security settings and user preferences. If the request
+ # is missing this header, the <tt>fallback_location</tt> will be used.
#
# redirect_back fallback_location: { action: "show", id: 5 }
# redirect_back fallback_location: post