Class: Matestack::Ui::Bootstrap::Components::Accordion
- Inherits:
-
BaseComponent
- Object
- Component
- BaseComponent
- Matestack::Ui::Bootstrap::Components::Accordion
- Defined in:
- lib/matestack/ui/bootstrap/components/accordion.rb
Instance Method Summary collapse
Instance Method Details
#prepare ⇒ Object
12 13 14 |
# File 'lib/matestack/ui/bootstrap/components/accordion.rb', line 12 def prepare @accordion_id = (context.id.present? ? context.id : "matestack-accordion-#{SecureRandom.hex(3)}") end |
#response ⇒ Object
16 17 18 19 20 21 |
# File 'lib/matestack/ui/bootstrap/components/accordion.rb', line 16 def response div accordion_attributes do accordion_content_partial if context.items.present? yield if block_given? end end |