Module: Bootstrap::ViewHelpers::CardHelper
- Defined in:
- app/helpers/bootstrap/view_helpers/card_helper.rb
Instance Method Summary collapse
- #bs_card(title_or_options = nil, options = {}, &block) ⇒ Object
- #bs_card_header(title_or_options = nil, options = {}, &block) ⇒ Object
Instance Method Details
#bs_card(title_or_options = nil, options = {}, &block) ⇒ Object
4 5 6 7 8 9 |
# File 'app/helpers/bootstrap/view_helpers/card_helper.rb', line 4 def bs_card( = nil, = {}, &block) = if block && .is_a?(Hash) [:title] = if .is_a?(String) Components::Card.new(self, || {}, &block).to_html end |
#bs_card_header(title_or_options = nil, options = {}, &block) ⇒ Object
11 12 13 14 15 16 |
# File 'app/helpers/bootstrap/view_helpers/card_helper.rb', line 11 def bs_card_header( = nil, = {}, &block) = if block && .is_a?(Hash) [:title] = if .is_a?(String) Components::Card.new(self, || {}, &block).header end |