Class: ActionDispatch::Routing::RouteSet::CustomUrlHelper
Do not use. This class is for internal use only.
Relationships & Source Files | |
Inherits: | Object |
Defined in: | actionpack/lib/action_dispatch/routing/route_set.rb |
Class Method Summary
- .new(name, defaults, &block) ⇒ CustomUrlHelper constructor
Instance Attribute Summary
Instance Method Summary
Constructor Details
.new(name, defaults, &block) ⇒ CustomUrlHelper
Instance Attribute Details
#block (readonly)
[ GitHub ]#defaults (readonly)
[ GitHub ]#name (readonly)
[ GitHub ]Instance Method Details
#call(t, args, only_path = false)
[ GitHub ]# File 'actionpack/lib/action_dispatch/routing/route_set.rb', line 693
def call(t, args, only_path = false) = args. url = t.full_url_for(eval_block(t, args, )) if only_path "/" + url.partition(%r{(?<!/)/(?!/)}).last else url end end
#eval_block(t, args, options) (private)
[ GitHub ]# File 'actionpack/lib/action_dispatch/routing/route_set.rb', line 705
def eval_block(t, args, ) t.instance_exec(*args, merge_defaults( ), &block) end