Module: ActionController::UrlFor

Extended by:
ActiveSupport::Concern
Includes:
ActionDispatch::Routing::UrlFor
Included in:
Redirecting
Defined in:
lib/action_controller/metal/url_for.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Methods included from ActionDispatch::Routing::UrlFor

#url_for

Methods included from ActionDispatch::Routing::PolymorphicRoutes

#polymorphic_path, #polymorphic_url

Instance Method Details

#_routesObject



15
16
17
18
# File 'lib/action_controller/metal/url_for.rb', line 15

def _routes
  raise "In order to use #url_for, you must include routing helpers explicitly. " \
        "For instance, `include Rails.application.routes.url_helpers"
end

#url_optionsObject



7
8
9
10
11
12
13
# File 'lib/action_controller/metal/url_for.rb', line 7

def url_options
  super.reverse_merge(
    :host => request.host_with_port,
    :protocol => request.protocol,
    :_path_segments => request.symbolized_path_parameters
  ).merge(:script_name => request.script_name)
end