Skip to content

Instantly share code, notes, and snippets.

@FanaHOVA
Created October 6, 2022 18:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FanaHOVA/0f23dcf699fbd7c41b688f5c05013378 to your computer and use it in GitHub Desktop.
Save FanaHOVA/0f23dcf699fbd7c41b688f5c05013378 to your computer and use it in GitHub Desktop.
How to use turbo-confirm alongside data-action with Rails / Stimulus / Turbo
<%= button_to path, form: { data: { action: 'controller#method', turbo_confirm: 'Are you sure?' } } do %>
<i class='fa fa-check' /> Do The Thing
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment