So far I've managed to come up with this piece of code:
1 <% @projects.each do |p| %>
2 <%= link_to p.name, project_path(p) %>
3 <%= link_to "edit", edit_project_path(p) %>
4 <%= link_to "delete", project_path(p), :method => :delete %>
5 <% end %>
When I click on 'delete' link it takes me to destroy.html.erb, not delete.html.erb. It also communicates with controllers 'destroy' action, not with 'delete' action. In addition, the URL looks like this /projects/1 (no /delete or /destroy). What is wrong here? Is this the best way to create delete link?