Tiago Ameller PRO said over 4 years ago on SweetAlerts in Rails 6 :
Hi, Dave. In my RoR 5 apps, I use this code (from StackOverflow, I guess :D) ``` $.rails.showConfirmationDialog = function (link) { const message = link.data('confirm') return swal( { title: message, type: 'warning', showCancelButton: true, reverseButtons: true } ).then(function (result) { if (result.value) { return $.rails.confirmed(link) } }) } ``` As you can see `return $.rails.confirmed(link)` makes the job. It works also with TurboLinks. I don't know if this code should work with RoR 6.