If you are using jquery-ujs and happens to get two confirm dialogs when using [data-confirm] with a button, all you have to do is put the data confirm attribute in a form attribute:
Before:
<%= button_to registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete do %>
Cancel my account
<% end %>
After
<%= button_to registration_path(resource_name), form: { data: { confirm: "Are you sure?" } }, method: :delete do %>
Cancel my account
<% end %>