Module: IconHelper

Includes:
FontAwesome::Sass::Rails::ViewHelpers
Defined in:
app/helpers/icon_helper.rb

Instance Method Summary collapse

Instance Method Details

#icon_fw(style, name, text = nil, html_options = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
# File 'app/helpers/icon_helper.rb', line 4

def icon_fw(style, name, text = nil, html_options = {})
  text, html_options = nil, text if text.is_a?(Hash)

  if html_options.key?(:class)
    html_options[:class] = "fa-fw #{html_options[:class]}"
  else
    html_options[:class] = "fa-fw"
  end

  icon(style, name, text, html_options)
end