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