Take the tour ×  In index.html.erb I display all products, and
next to each product I have Edit and Delete actions:  <%
@products.each do |product| %>   <%= link_to("Edit",
edit_product_path(product.id), :class => 'action') %>   <%=
link_to("Delete", product, :method => :delete, :class =>
'action') %> <% end %>  The Edit link works ok. However, the
Delete link does not work. I get the following error:  Unknown
action The action 'show' could not be found for
ProductsController  I guess it is because the request method is
GET rather than DELETE. But, I don't know why this happens if I
set explicitly :method => :delete.  routes.rb is pretty simple:
root :to => "products#index" resources :products  I have
Javascript enabled.  Please suggest.  share|improve this
question Did you try adding the show action, even though you are
not using it so that your routes have you covered?... Just a
thought –  Richard Dec 15 '10 at 4:50 Do you have delete action
in your controller? And also try rake:route command to see if
del