Module: Components::PopoverHelper

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

Instance Method Summary collapse

Instance Method Details

#popover_content(options = {}, &block) ⇒ Object



11
12
13
14
# File 'app/helpers/components/popover_helper.rb', line 11

def popover_content(options = {}, &block)
  content_for :popover_content_class, options[:class], flush: true
  content_for :popover_content, capture(&block), flush: true
end

#popover_trigger(&block) ⇒ Object



7
8
9
# File 'app/helpers/components/popover_helper.rb', line 7

def popover_trigger(&block)
  content_for :popover_trigger, capture(&block), flush: true
end

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



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

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