Issue title: Undefined method 'count' for NilClass
 Issue body: I am getting an undefined method error 'count' for nil38d1:d2b4:3d06:83e8:96a5:8c2:893d:aba5NilClass with my current implementation. I've used this gem successfully in the past but can't seem to troubleshoot my current issue.

I am trying to show my user (Company) all their unique customers, aka one record per customer that links_to their overall history/info. I have the opposite working where the table displays all records for all the Company's customers, but that is basically pointless for desired experience/interaction.

Using pry, I've verified I have the collection of unique records I need in ActiveRecor38d1:d2b4:3d06:83e8:96a5:8c2:893d:aba5Relation38d1:d2b4:3d06:83e8:96a5:8c2:893d:aba5tiveRecord Relation LawnProfile format (it is not an array) returning from my get_raw_records method:
`def get_raw_records
    lawn_array = Appointment.where(:company_id => options[:company]).order(service_date: :desc).includes(:homeowner, :lawn_profile).references(:homeowner, :lawn_profile).map(&:lawn_profile_id).uniq
    binding.pry
    LawnProfile.where(id: lawn_array)
  end`

Error seems to occur within data method when mapping records. Here is the method that, again, works perfectly fine when returning all records for all users:
`def data
    records.map do |record|
      @homeowner_info = "#{record.homeowner.name} <br/> #{record.street.titleize}"
      if record.appointments.paid.any?
          last_photo = record.appointments.paid.last.completed_work.url(:small)
          @lawn_photo = "<image src= #{last_photo}></image>"
      else 
          @lawn_photo = "<image src=https://maps.googleapis.com/maps/api/streetview?size=584x300&location=#{record.lawn_profile.street.parameterize}#{record.lawn_profile.city.parameterize}&key=googleMapkey></img>"
      end
       [
        @lawn_photo,
        @homeowner_info,
        record.appointments.last.formatted_price,
        "",
        record.homeowner.id,
      ]
    end
  end`

The fact that before records.map tries to run 'records' is and ActiveRecor38d1:d2b4:3d06:83e8:96a5:8c2:893d:aba5Relation containing the records that I need but still throwing the NilClass error is giving me fits. I'm not calling 'count' method anywhere myself, so it certainly seems to be a fundamental issue that I cannot resolve.

Here is my controller code:
`def my_customers
      @vendor = current_user
      @company = current_user.company
      @appt_reliability = vendor_reliability

      respond_to do |format|
        format.html
        format.json { render json: VendorCustomersDatatable.new(view_context, {company: @company.id}) }
      end

    end`

Here is my view:
`<table id="vendor_customers_table" class="display" data-source="<%= my_customers_url(company: @company.id, format: 'json') %>">
                                        <thead>
                                            <tr>
                                              <th></th>
                                              <th></th>
                                              <th></th>
                                              <th></th>
                                              <th></th>
                                            </tr>
                                        </thead>
                                    </table>`

Thanks in advance. Any insight is much appreciated.
 Comments: 
 Comment 0: I apologize for the formatting. markdown and indentation are not playing nice.
 Comment 1: try to override as_json method. and you can debug where is an error comes from.
https://github.com/antillas21/ajax-datatables-rails/blob/v-0-4-0/lib/ajax-datatables-rails/base.rb#L37
 Comment 2: Hi @JonZach  try to turn off searching and ordering options on your datatable.rb(https://github.com/ajahongir/ajax-datatables-rails-v-0-4-0-how-to/blob/master/app/datatables/city_datatable.rb#L6) with options: orderable: false, searchable: false
 Comment 3: Hi there! Any news?
{'source': 'GithubIssues', 'repo_name_with_owner': 'antillas21/ajax-datatables-rails', 'issue_id': 200814783, 'repo_stars': 257.0}