Module: Accordion::AccordionHelper

Defined in:
app/helpers/accordion/accordion_helper.rb

Instance Method Summary collapse

Instance Method Details

#accordion(**options) ⇒ Object



5
6
7
8
9
# File 'app/helpers/accordion/accordion_helper.rb', line 5

def accordion(**options)
  render(Accordion::AccordionComponent.new(**options)) do |c|
    yield(c)
  end
end

#item(c, **options) ⇒ Object



11
12
13
14
15
# File 'app/helpers/accordion/accordion_helper.rb', line 11

def item(c, **options)
  c.with_item(**options) do
    yield
  end
end