Module: Bootstrap::ViewHelpers::BadgeHelper
- Defined in:
- app/helpers/bootstrap/view_helpers/badge_helper.rb
Instance Method Summary collapse
- #bs_badge(label_or_options = {}, options = {}, &block) ⇒ Object
- #bs_pill(label_or_options = {}, options = {}, &block) ⇒ Object
Instance Method Details
#bs_badge(label_or_options = {}, options = {}, &block) ⇒ Object
4 5 6 7 8 |
# File 'app/helpers/bootstrap/view_helpers/badge_helper.rb', line 4 def bs_badge( = {}, = {}, &block) = if block_given? [:label] = unless block_given? Components::Badge.new(self, , &block).to_html end |
#bs_pill(label_or_options = {}, options = {}, &block) ⇒ Object
10 11 12 13 14 15 |
# File 'app/helpers/bootstrap/view_helpers/badge_helper.rb', line 10 def bs_pill( = {}, = {}, &block) = if block_given? [:label] = unless block_given? [:pill] = true Components::Badge.new(self, , &block).to_html end |