Class: TurboOverlay::ConfirmConfig
- Inherits:
-
Object
- Object
- TurboOverlay::ConfirmConfig
- 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
-
#style ⇒ Object
Returns the value of attribute style.
Instance Method Summary collapse
-
#initialize(style:) ⇒ ConfirmConfig
constructor
A new instance of ConfirmConfig.
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
#style ⇒ Object
Returns the value of attribute style.
50 51 52 |
# File 'lib/turbo_overlay/configuration.rb', line 50 def style @style end |