method
_compute_redirect_to_location
v3.0.0 -
Show latest stable
- Class:
ActionController::Redirecting
_compute_redirect_to_location(options)private
No documentation available.
# File actionpack/lib/action_controller/metal/redirecting.rb, line 74
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
else
url_for(options)
end.gsub(/[\r\n]/, '')
end