instance method
_compute_redirect_to_location
Ruby on Rails 3.2.22.5
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 89
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{^(\w[\w+.-]*:|//).*}
options
when String
request.protocol + request.host_with_port + options
when :back
raise RedirectBackError unless refer = request.headers["Referer"]
refer
when Proc
_compute_redirect_to_location options.call
else
url_for(options)
end.gsub(/[\0\r\n]/, '')
end
Defined in actionpack/lib/action_controller/metal/redirecting.rb line 89
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::Redirecting