REST destroy link generate problem
- by Wei
I am using rails beta 3 and I have a erb page named index.html.erb for discussions controller. In that page, I have a link as following:
<%= link_to 'Delete', {:action='destroy', :id=@discussion}, :confirm="Are you sure", :method='post' %
Which is supposed to generate a link to delete a discussion, however, the generated html is
Delete
which always routes to the show action. I think the href should be /discussions/destroy/1. But for some reason it is not.
Any ideas? Thanks in advance.