Reputation: 11125
I can't understand why this simple routing isn't working right now.
The link below doesn't work: it gives routing error No route matches [DELETE] "/questions"
<%= link_to 'delete', @question, :method => :delete, :action => :destroy %>
rake routes
shows
DELETE /questions/:id(.:format) questions#destroy
correctly.
Does anyone can find the reason for this error?
Upvotes: 0
Views: 43
Reputation: 6728
Try
<%= link_to 'delete', question_path(@question), :method => :delete, :confirm => "Are you sure?" %>
Upvotes: 1