Module: Components::CollapsibleHelper

Defined in:
app/helpers/components/collapsible_helper.rb

Instance Method Summary collapse

Instance Method Details

#collapsible_body(&block) ⇒ Object



6
7
8
# File 'app/helpers/components/collapsible_helper.rb', line 6

def collapsible_body(&block)
  content_for :body, capture(&block) if block
end

#collapsible_preview(&block) ⇒ Object



2
3
4
# File 'app/helpers/components/collapsible_helper.rb', line 2

def collapsible_preview(&block)
  content_for :preview, capture(&block) if block
end

#render_collapsible(**options, &block) ⇒ Object



10
11
12
13
# File 'app/helpers/components/collapsible_helper.rb', line 10

def render_collapsible(**options, &block)
  content = capture(&block) if block
  render "components/ui/collapsible", content: content, **options
end