instance method
_compute_redirect_to_location
Ruby on Rails 3.1.12
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 79
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 (":").
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 79
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::Redirecting