Module: ActionController::UrlFor

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

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary (collapse)

Methods included from ActiveSupport::Concern

append_features, extended, included

Methods included from ActionDispatch::Routing::UrlFor

#url_for

Methods included from ActionDispatch::Routing::PolymorphicRoutes

#polymorphic_path, #polymorphic_url

Instance Method Details

- (Object) _routes



15
16
17
18
# File 'actionpack/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

- (Object) url_options



7
8
9
10
11
12
13
# File 'actionpack/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