Class: Matestack::Ui::Bootstrap::Components::Accordion

Inherits:
Component
  • Object
show all
Defined in:
app/concepts/matestack/ui/bootstrap/components/accordion.rb

Instance Method Summary collapse

Instance Method Details

#responseObject



13
14
15
16
17
18
# File 'app/concepts/matestack/ui/bootstrap/components/accordion.rb', line 13

def response
  div accordion_attributes do
    accordion_content_partial if items.present?
    yield_components
  end
end

#setupObject



9
10
11
# File 'app/concepts/matestack/ui/bootstrap/components/accordion.rb', line 9

def setup
  @accordion_id = (bs_id.present? ? bs_id : "matestack-accordion-#{SecureRandom.hex(3)}")
end