Method: ActionDispatch::Routing::RouteSet::CustomUrlHelper#call

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

#call(t, args, only_path = false) ⇒ Object



681
682
683
684
685
686
687
688
689
690
# File 'actionpack/lib/action_dispatch/routing/route_set.rb', line 681

def call(t, args, only_path = false)
  options = args.extract_options!
  url = t.full_url_for(eval_block(t, args, options))

  if only_path
    "/" + url.partition(%r{(?<!/)/(?!/)}).last
  else
    url
  end
end