DEV Community

Discussion on: How to use SweetAlert2 for your Rails +5.1 (rails-ujs) confirms without jQuery

Collapse
 
fydelio profile image
fydelio

Hi Peter

I used this post to implement it with data-confirm-swal with SweetAlert. But now I'm migrating to Webpacker, but I just can't get it running here.

// Add event listener before the other Rails event listeners like the one
// for method: :delete

What type of event listener were you talking about? Could you be more specific, Help would be highly appreciated.

Collapse
 
peterfication profile image
Peter Gundel

I'm talking about the Javascript event listeners. You should probably have a look at this Rails guide for understanding them better: edgeguides.rubyonrails.org/working...