Rails 4 + Datatables: Ajax-datatables-rails gem will not update table
<p>I am trying to use the <code>ajax-datatables-rails</code> gem found <a href="https://github.com/antillas21/ajax-datatables-rails" rel="nofollow">here</a> with no luck.  My table shows up, and has the right data (for the first page), but when I attempt to search, sort, or change pages, no table data gets updated.  </p>

<p><strong>Am I missing something simple?</strong></p>

<p><strong>View</strong></p>

<pre><code>&lt;table id="users-table" data-source="&lt;%= users_path(format: :json) %&gt;"&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;ID&lt;/th&gt;
      &lt;th&gt;Name&lt;/th&gt;
      &lt;th&gt;Email&lt;/th&gt;
      &lt;th&gt;Admin?&lt;/th&gt;
      &lt;th&gt;Employee?&lt;/th&gt;
      &lt;th&gt;Client?&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
</code></pre>

<p><strong>Controller</strong></p>

<pre><code>def index
    respond_to do |format|
        format.html 
    format.json { render json: UserDatatable.new(view_context) }
    end
end
</code></pre>

<p><strong>Datatable</strong></p>

<pre><code>class UserDatatable &lt; AjaxDatatablesRails::Base
  # uncomment the appropriate paginator module,
  # depending on gems available in your project.
  # include AjaxDatatablesRails::Extensions::Kaminari
   include AjaxDatatablesRails::Extensions::WillPaginate
  # include AjaxDatatablesRails::Extensions::SimplePaginator

  def sortable_columns
    # list columns inside the Array in string dot notation.
    # Example: 'users.email'
        @sortable_columns ||= [
            'users.id', 
            'users.name',
            'users.email',
            'users.admin',
            'users.employee',
            'users.is_client'
        ]
  end

  def searchable_columns
    # list columns inside the Array in string dot notation.
    # Example: 'users.email'
        @searchable_columns ||= [
            'users.id', 
            'users.name',
            'users.email',
            'users.admin',
            'users.employee',
            'users.is_client'
        ]
  end

  private

  def data
    records.map do |record|
      [
        # comma separated list of the values for each cell of a table row
        # example: record.attribute,
                record.id, 
                record.name, 
                record.email, 
                record.admin, 
                record.employee, 
                record.is_client
      ]
    end
  end

  def get_raw_records
    # insert query here
        User.all
  end

  # ==== Insert 'presenter'-like methods below if necessary
end
</code></pre>

<p><strong>js</strong></p>

<pre><code>$('#users-table').dataTable({
    "processing": true,
    "serverSide": true,
    "ajax": $('#users-table').data('source')
    "pagingType": "full_numbers"
    // optional, if you want full pagination controls.
    // Check dataTables documentation to learn more about
    // available options.
});
</code></pre>