I am going through the rails 3 tutorial at railstutorial.org. I have just created an extremely simple scaffold Users.
The scaffold-generated destroy link does not wo
I notice that in rails 4, link_to
puts the :method as a html attribute "data-method" but :confirm goes to an attribute "confirm" where the javascript needs it to be "data-confirm".
Not sure if this is a bug in rails, but you can work around it by doing this:
<%= link_to 'Destroy', user, :data => {:confirm => 'Are you sure?'}, :method => :delete %>