Module: BootstrapLeather::BadgesHelper
- Included in:
- ApplicationHelper
- Defined in:
- app/helpers/bootstrap_leather/badges_helper.rb
Overview
Badges, i.e. tiny counts in a pill shape
Instance Method Summary collapse
Instance Method Details
#badge(content, type = nil) ⇒ Object
14 15 16 17 18 19 |
# File 'app/helpers/bootstrap_leather/badges_helper.rb', line 14 def badge(content, type = nil) render( partial: 'bootstrap_leather/badges/badge', locals: { content: content, type: type } ) end |
#badge_to(text, value, link, html_options = {}) ⇒ Object
6 7 8 9 10 11 12 |
# File 'app/helpers/bootstrap_leather/badges_helper.rb', line 6 def badge_to(text, value, link, = {}) [:href] = url_for link render( partial: 'bootstrap_leather/badges/badge_to', locals: { text: text, value: value, html_options: } ) end |