Module: Components::AlertDialogHelper

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

Instance Method Summary collapse

Instance Method Details

#alert_dialog_cancel(&block) ⇒ Object



19
20
21
# File 'app/helpers/components/alert_dialog_helper.rb', line 19

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

#alert_dialog_content(&block) ⇒ Object



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

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

#alert_dialog_continue(&block) ⇒ Object



15
16
17
# File 'app/helpers/components/alert_dialog_helper.rb', line 15

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

#alert_dialog_trigger(&block) ⇒ Object



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

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

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



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

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