url_options() public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_controller/metal/url_for.rb, line 25
    def url_options
      @_url_options ||= super.reverse_merge(
        :host => request.host,
        :port => request.optional_port,
        :protocol => request.protocol,
        :_recall => request.symbolized_path_parameters
      ).freeze

      if (same_origin = _routes.equal?(env["action_dispatch.routes"])) ||
         (script_name = env["ROUTES_#{_routes.object_id}_SCRIPT_NAME"]) ||
         (original_script_name = env['ORIGINAL_SCRIPT_NAME'])

        @_url_options.dup.tap do |options|
          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
        end
      else
        @_url_options
      end
    end
Register or log in to add new notes.