<% unless @payments.empty? %>
<% end %> <%= javascript_tag do %> function disableLinks() { $('a.btn.disabled').click(function (e) { // preventDefault is not enough due to the confirmation popup return false; }); } $(document).ready(function() { disableLinks(); $('#invoice-table').dataTable({ "dom": "t", "paging": false, "order": [[ 1, "asc" ]], "columns": [ null, null, null, null, null, null, { "orderable": false } ] }); }); <% end %>