I'm a beginner with rails and I want to use Sweet Alert to replace the basic ugly confirm messages on deleting records. I've added sweet-alert gem and sweet-alert-confirm to my gem file I've done exactly what they said in the their Read Me, but It doesn't work, I can delete records but It got deleted right away without any confirm message of any kind.
Gemfile
...
gem 'sweet-alert'
gem 'sweet-alert-confirm'
...
Application.jssupported directives.
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require jquery.turbolinks
//= require bootstrap-sprockets
//= require sweet-alert
//= require sweet-alert-confirm
//= require_tree .
stylesheet.css
/*
...
*= require_self
*= require sweet-alert
*= require_tree .
*/
index.html.erb
...
<%= link_to 'Destroy', ice_cream, method: :delete, data: { confirm: 'Are you sure?' } %>
...
Also, there is somethings I don't know if It worth mention, when I open firebug I find the following error.
Hope you can help me, Thank you.