instance method
url_options
Ruby on Rails 4.2.9
Since v3.0.20Signature
url_options()
No documentation comment.
Source
# File actionpack/lib/action_controller/metal/url_for.rb, line 25
def url_options
@_url_options ||= {
:host => request.host,
:port => request.optional_port,
:protocol => request.protocol,
:_recall => request.path_parameters
}.merge!(super).freeze
if (same_origin = _routes.equal?(env["action_dispatch.routes".freeze])) ||
(script_name = env["ROUTES_#{_routes.object_id}_SCRIPT_NAME"]) ||
(original_script_name = env['ORIGINAL_SCRIPT_NAME'.freeze])
options = @_url_options.dup
if original_script_name
options[:original_script_name] = original_script_name
else
options[:script_name] = same_origin ? request.script_name.dup : script_name
end
options.freeze
else
@_url_options
end
end
Defined in actionpack/lib/action_controller/metal/url_for.rb line 25
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::UrlFor