Module: BootstrapLeather::IconsHelper
- Included in:
- ApplicationHelper
- Defined in:
- app/helpers/bootstrap_leather/icons_helper.rb
Overview
Icons, i.e. tiny images from fonts
Instance Method Summary collapse
- #icon(type) ⇒ Object
- #icon_button_to(button_class, icon_type, text, link, html_options = {}) ⇒ Object
- #icon_link_to(icon_type, text, link, html_options = {}) ⇒ Object
Instance Method Details
#icon(type) ⇒ Object
6 7 8 |
# File 'app/helpers/bootstrap_leather/icons_helper.rb', line 6 def icon(type) render(partial: 'bootstrap_leather/icons/icon', locals: { type: type }) end |
#icon_button_to(button_class, icon_type, text, link, html_options = {}) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'app/helpers/bootstrap_leather/icons_helper.rb', line 10 def (, icon_type, text, link, = {}) [:class] = 'btn btn-' + render( partial: 'bootstrap_leather/icons/icon_button_to', locals: { button_class: , icon_type: icon_type, text: text, link: link, html_options: } ) end |
#icon_link_to(icon_type, text, link, html_options = {}) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 |
# File 'app/helpers/bootstrap_leather/icons_helper.rb', line 21 def icon_link_to(icon_type, text, link, = {}) render( partial: 'bootstrap_leather/icons/icon_link_to', locals: { icon_type: icon_type, text: text, link: link, html_options: } ) end |