Module: FontMfizz::Rails::IconHelper
- Defined in:
- app/helpers/font_mfizz/rails/icon_helper.rb
Defined Under Namespace
Modules: Private
Instance Method Summary collapse
-
#fm_icon(names = "icon-ruby", text = "") ⇒ Object
Creates an icon tag given an icon name and possible icon modifiers.
Instance Method Details
#fm_icon(names = "icon-ruby", text = "") ⇒ Object
Creates an icon tag given an icon name and possible icon modifiers.
Examples
fm_icon "icon-ruby" "I'm Ruby!"
# => <i class="icon-ruby"></i> I'm Ruby!
12 13 14 15 16 17 18 19 |
# File 'app/helpers/font_mfizz/rails/icon_helper.rb', line 12 def fm_icon(names = "icon-ruby", text = "") classes = [] = {} [:class] = classes classes << Private.icon_names(names) icon = content_tag(:i, nil, ) Private.icon_join(icon, text) end |