David Kimura PRO said over 5 years ago on SweetAlerts in Rails 6 :
And, changing the original code with your confirmed element instead of removing the data attribute doesn't work either. It's really strange. `Rails.confirmed(element)`