class ActionDispatch::Routing::RouteSet::CustomUrlHelper
def call(t, args, only_path = false)
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
def eval_block(t, args, options)
def eval_block(t, args, options) t.instance_exec(*args, merge_defaults(options), &block) end
def initialize(name, defaults, &block)
def initialize(name, defaults, &block) @name = name @defaults = defaults @block = block end
def merge_defaults(options)
def merge_defaults(options) defaults ? defaults.merge(options) : options end