Method: ActionDispatch::Routing::UrlFor#full_url_for

Defined in:
actionpack/lib/action_dispatch/routing/url_for.rb

#full_url_for(options = nil) ⇒ Object

:nodoc:



182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
# File 'actionpack/lib/action_dispatch/routing/url_for.rb', line 182

def full_url_for(options = nil) # :nodoc:
  case options
  when nil
    _routes.url_for(url_options.symbolize_keys)
  when Hash, ActionController::Parameters
    route_name = options.delete :use_route
    merged_url_options = options.to_h.symbolize_keys.reverse_merge!(url_options)
    _routes.url_for(merged_url_options, route_name)
  when String
    options
  when Symbol
    HelperMethodBuilder.url.handle_string_call self, options
  when Array
    components = options.dup
    polymorphic_url(components, components.extract_options!)
  when Class
    HelperMethodBuilder.url.handle_class_call self, options
  else
    HelperMethodBuilder.url.handle_model_call self, options
  end
end