%h2= @user.name %table#transactions.display{data: { source: user_path(@user) }} %thead %tr %th Amount %th Origin %th Message %th Peer %th Time %tbody :javascript $(document).ready(function() { $('#transactions').DataTable({ 'processing': true, 'serverSide': true, 'ajax': $('#transactions').data('source'), 'pagingType': 'full_numbers' }); });