jbox-web / ajax-datatables-rails

A wrapper around DataTable's ajax methods that allow synchronization with server-side pagination in a Rails app
MIT License
584 stars 228 forks source link

Invalid JSON Response Error #395

Open axmitchell opened 3 years ago

axmitchell commented 3 years ago

Making a jump from 0.4.2 to the latest 1.3.1 version and Im now receiving an error:

NotImplementedError:
   NotImplementedError
#Selenium::WebDriver::Error::UnexpectedAlertOpenError:
     #   unexpected alert open: {Alert text : DataTables warning: table id=DataTables_Table_0 - Invalid JSON response.

The error points to this segment of code.

    respond_to do |format|
      format.html
      format.json do
        render json: VolunteerManagement::Admin::AssignmentsDatatable.new(
          view_context,
          school_id: @school.id,
          role_map: @role_map,
        )
      end
    end

VolunteerManagement::Admin::AssignmentsDatatable inherits from AjaxDatatablesRails::Base

Apologies if this isn't as thorough as expected. First time making an issue report. Will be happy to provide further details.

AndrewKvalheim commented 2 years ago

Have you seen the migration documentation? Several methods in AjaxDatatablesRails::Base raise NotImplementedError.