app/helpers/locomotive/base_helper.rb
# Like link_to but instead of passing a label, we
# pass the name of an Font Awesome icon.
# If the name is a Symbol, we append "icon-" to the
# dasherized version of the name.
#
# @param [ String / Symbol ] name The class name or a symbol
# @param [ Array ] *args
#
# @return [ String ] The HTML <a> tag
#
Like link_to but instead of passing a label, we
pass the name of an Font Awesome icon.
If the name is a Symbol, we append "icon-" to the
dasherized version of the name.
Like link_to but instead of passing a label we pass the name of an Font Awesome icon . If the name is a Symbol we append " icon - " to the dasherized version of the name .
def link_to_icon(name, *args, &block)
      name = name.is_a?(Symbol) ? "icon-#{name.to_s.dasherize}" : name
      icon = content_tag(:i, '', class: name)
      link_to(icon, *args, &block).html_safe
    end
def link_to_icon ( name , * args , & block ) name = name . is_a? ( Symbol ) ? "icon-#{name.to_s.dasherize}" : name icon = content_tag ( :i , '' , class : name ) link_to ( icon , * args , & block ) . html_safe end
Like link_to but instead of passing a label, we
pass the name of an Font Awesome icon.
Like link_to but instead of passing a label we pass the name of an Font Awesome icon .
The HTML  tag
The HTML tag
 String 
name
<not_specific>
args
<not_specific>
block
<not_specific>
<not_specific>
None