tracks/app/helpers/icon_helper.rb

16 lines
382 B
Ruby
Raw Permalink Normal View History

2016-02-14 21:58:23 -05:00
module IconHelper
include FontAwesome::Sass::Rails::ViewHelpers
2020-10-10 13:58:13 +03:00
def icon_fw(style, name, text = nil, html_options = {})
2016-02-14 21:58:23 -05:00
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
2020-08-19 11:54:50 +03:00
icon(style, name, text, html_options)
2016-02-14 21:58:23 -05:00
end
end