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!!
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to