ncr

Joined

20 Experience
0 Lessons Completed
0 Questions Solved

Activity

`Because you are using Turbo, you need to add the data-turbo-confirm to the form itself, unlike in rails-ujs. Which you would add it to the button.

Keep in mind button_to generated a form unlike link_to`

Got it to work using this
<%= button_to "Disconnect", twitter_account, method: :delete, form: { data: { turbo_confirm: 'Are you sure?' } }, class:"btn btn-outline-danger" %>. Source is stackoverflow but unfortunately links cannot be added to the comment section so will just copy over the explanation.

Earn XP by completing lessons, posting on the forum, and answering forum questions