Module: Components::PopoverHelper
- Defined in:
- app/helpers/components/popover_helper.rb
Instance Method Summary collapse
- #popover_content(options = {}, &block) ⇒ Object
- #popover_trigger(&block) ⇒ Object
- #render_popover(**options, &block) ⇒ Object
Instance Method Details
#popover_content(options = {}, &block) ⇒ Object
11 12 13 14 |
# File 'app/helpers/components/popover_helper.rb', line 11 def popover_content( = {}, &block) content_for :popover_content_class, [: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(**, &block) content = capture(&block) if block render "components/ui/popover", content: content, ** end |