Module: ActionView::Helpers::UrlHelper

Defined in:
lib/access_kit/core_ext/url_helper.rb

Instance Method Summary collapse

Instance Method Details



8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/access_kit/core_ext/url_helper.rb', line 8

def link_to_with_supplement(*args, &block)
  if block_given? || 
     ( new_args = AccessKit::UrlHelperAdditions.process_options_for_link_to_with_supplement(*args) ).nil?
    # either a block was passed or
    # the arguments did not include options for suplementary text
    # so just pass through to original link_to without modification
    link_to_without_supplement(*args, &block)
  else 
    # call original link_to with new args which contain 
    # new name that includes supplementary text
    link_to_without_supplement(*new_args)
  end
end