Module: AssetBox::Rails::ViewHelpers
- Defined in:
- lib/asset_box/rails/helpers.rb
Instance Method Summary collapse
Instance Method Details
#icon(style, name, text = nil, html_options = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/asset_box/rails/helpers.rb', line 4 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 |