I'm using Rails 3, i have a link_to with method :delete, but when i click this link it goes to the show action instead the destroy one.
my question is how to solve this problem?
thanks in advance.
code: <%= link_to 'Delete', list_path(@list.id), :method => :delete, :confirm => 'Are you sure?' %>
You don't have the jquery
and jquery_ujs
libraries included by your application.js
file, or you're not even including your application.js
file in app/views/layouts/application.html.erb
. This is typically done with this line:
<%= javascript_include_tag "application" %>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With