instance method
_compute_redirect_to_location
Ruby on Rails 4.0.13
Since v3.0.20 Last seen in v4.0.13 PrivateSignature
_compute_redirect_to_location(options)
No documentation comment.
Parameters
-
optionsreq
Source
# File actionpack/lib/action_controller/metal/redirecting.rb, line 86
def _compute_redirect_to_location(options)
case options
# The scheme name consist of a letter followed by any combination of
# letters, digits, and the plus ("+"), period ("."), or hyphen ("-")
# characters; and is terminated by a colon (":").
# The protocol relative scheme starts with a double slash "//"
when %r{\A(\w[\w+.-]*:|//).*}
options
when String
request.protocol + request.host_with_port + options
when :back
request.headers["Referer"] or raise RedirectBackError
when Proc
_compute_redirect_to_location options.call
else
url_for(options)
end.delete("\0\r\n")
end
Defined in actionpack/lib/action_controller/metal/redirecting.rb line 86
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::Redirecting