Method: Fe::ApplicationHelper#link_to_function
- Defined in:
- app/helpers/fe/application_helper.rb
#link_to_function(name, *args, &block) ⇒ Object
48 49 50 51 52 53 54 55 56 |
# File 'app/helpers/fe/application_helper.rb', line 48 def link_to_function(name, *args, &block) = args..symbolize_keys function = block_given? ? update_page(&block) : args[0] || '' onclick = "#{"#{[:onclick]}; " if [:onclick]}#{function}; return false;" href = [:href] || '#' content_tag(:a, name, .merge(href: href, onclick: onclick)) end |