# Font Awesome Helper module IconHelper def fa_icon(name, html_options = {}) html_options[:style] ||= :solid html_options['aria-hidden'] ||= true content_class = "fa-#{html_options[:style].to_s.dasherize} fa-#{name.to_s.dasherize}" content_class << " fa-#{html_options[:size].to_s.dasherize}" if html_options.key? :size content_class << " #{html_options[:class]}" if html_options.key? :class tag.i(class: content_class, 'aria-hidden': html_options['aria-hidden']) end end