My delete/destroy is not working for Rails 3.
Not for any scaffold or even for new projects.
<%= link_to \'Destroy\', card, :confirm => \'Are y
I ran into the same issue Mohit had and also needed to include the 'Unobtrusive JavaScript Library' (or 'ujs') in my JavaScript assets. In my current Rails (v3.2.5), the UJS library will be provided automatically. You can verify this by seeing the following line in your Gemfile:
gem 'jquery-rails'
and the following line in your app/assets/javascripts/application.js file:
//= require jquery_ujs
Since I didn't know any better, I had removed the require jquery_ujs
line from my own application.js file, and it took me a while to figure out why my link_to ..., :method => :delete
calls weren't working any more!
Once I understood the problem, it was easy to add the above two lines back to their respective files and everything started working as expected again.