var table = $('#products_table').DataTable();
table.clear().draw();

<% @details.each do |detail| %>
	var newRow = $("<%= j render partial: ('/sales/sales_detail'), locals: { detail: detail } %>");
	table.row.add(newRow).draw();
<% end %>
