Method: Para::TagHelper#icon_link_to
- Defined in:
- app/helpers/para/tag_helper.rb
#icon_link_to(name, url_options = nil, options = nil, &block) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/helpers/para/tag_helper.rb', line 3 def icon_link_to(name, = nil, = nil, &block) if block , = , name name = capture { block.call } end if (icon = .delete(:icon)) icon_tag = content_tag(:i, '', class: "fa fa-#{ icon }") name = [icon_tag, name].join(' ').html_safe end link_to(name, , ) end |