This tag with rails 3
<%= link_to \'Destroy\', item, :method => :delete,:confirm=>\'Are you sure?\' %>
produces this html
I copy this solution from another post, but this is what worked for me (rails 5)
"remove jquery_ujs from your application.js as rails_ujs is enough for later rails version."
I had included:
//= require jquery
//= require jquery-ujs
//= require rails-ujs
and after deleting it, all works fine. Solution from: Why am I getting a JQuery alert twice in Rails?