I tried to delete from a datatable that I represent with will_paginate and ajax. In the view there are something like that:
<tbody> <% @items.each do |i| %> <tr class="<%= cycle("even","odd") %>"> <td><%= i.name %></td> <td><%= i.quantity %></td> <td><%= i.price %></td> <td><%= link_to 'Destroy', :method => :delete %></td> </tr> <% end %> </tbody>
In the controller I have this:
def destroy(a) @Item = Item.find(:id) @Item.destroy end
And the web don't have error but don't run I have to do with ajax or something like that?? Thank you very much!!