Class: TurboOverlay::ConfirmConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/turbo_overlay/configuration.rb

Overview

Confirm prompt config. Controls how ‘data-turbo-confirm` is rendered when the gem’s themed confirm hook is registered via ‘register(application, { confirm: true })`.

  • ‘style`: `:modal` (default) renders the prompt centered in the modal chrome. `:popover` renders it anchored to the submitter element (the clicked link or button), which is often friendlier for destructive actions next to a row or button. Per-link override via `data-turbo-confirm-style=“popover”` (or `“modal”`) on the link/form.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(style:) ⇒ ConfirmConfig

Returns a new instance of ConfirmConfig.



52
53
54
# File 'lib/turbo_overlay/configuration.rb', line 52

def initialize(style:)
  @style = style
end

Instance Attribute Details

#styleObject

Returns the value of attribute style.



50
51
52
# File 'lib/turbo_overlay/configuration.rb', line 50

def style
  @style
end