Module: FontawesomeHelper
- Defined in:
- app/helpers/fontawesome_helper.rb
Overview
Move fontawesomeinto default gemset and remove once off metal
Instance Method Summary collapse
Instance Method Details
#icon(style, name, text = nil, html_options = {}) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/helpers/fontawesome_helper.rb', line 10 def icon(style, name, text = nil, = {}) text, = nil, text if text.is_a?(Hash) content_class = +"#{style} fa-#{name}" content_class << " #{[:class]}" if .key?(:class) [:class] = content_class html = content_tag(:i, nil, ) html << ' ' << text.to_s unless text.blank? html end |