What's wrong with my delete method in Rails?
I'm new to Rails so this is probably easy. Can you take a look at the
delete method in my code and let me know what's wrong? I've done some
searching but am not finding exactly what I need to do. Basically I'm
creating a twitter type site to post statuses as I'm learning.
Thanks!
<div class="page-header"><h1>All Statuses</h1></div>
<% @statuses.each do |status| %>
<div>
<strong><%= status.name %></strong>
<p><%= status.content %></p>
</div>
<div class="meta"><%= link_to 'Show', status %></div>
<div class="admin"><%= link_to 'Edit', edit_status_path(status) %> | <%=
link_to 'Delete', admin_status_path(status.id), :method=>delete,
:class=>destroy, :confirm=>"Are you sure you want to delete this
status?" %></div>
<% end %>
No comments:
Post a Comment