Topic: How to add delete link to Datatables via json/ajax?
I'm working on a table based on RailsCast #340 on DataTables.
I've added ajax support as Ryan discusses towards the end of the episode.
However, I'm not sure how to add a "delete" link to the json array, because I can't figure out how to include the "method: :delete" part. I'd also like to know how I can pass the Bootstrap class and confirm options.
Here's the view code I'm trying to replicate:
<%= link_to 'Delete', product, method: :delete, class: "btn btn-mini btn-danger", confirm: "You sure?", title: product.product_number %>
Last edited by Brian71 (2012-05-10 13:06:49)