mois3x / sweet-alert-rails-confirm

A Rails confirm replacement with SweetAlert
MIT License
73 stars 50 forks source link

Does not work with turbolinks #11

Closed mrisoli closed 8 years ago

mrisoli commented 9 years ago

Is there a way to make this work with turbolinks/jquery.turbolinks? In my experience it skips the confirmation modal and executes the button action straight away.

mois3x commented 9 years ago

Hi, if you try the gem directly from github should work.

gem 'sweet-alert-confirm', git: 'https://github.com/mois3x/sweet-alert-rails-confirm

Because of this: https://github.com/mois3x/sweet-alert-rails-confirm/blob/master/lib/assets/javascripts/sweet-alert-confirm.js#L87

mrisoli commented 9 years ago

Didn't work, was already using the gem directly from github

EDIT: I managed to make the modal appear on a link_to confirm using data-no-turbolink, but the same did not work for a submit tag on a form.