Update datatables for ajax-datatables-rails 1

Resolves:

  - inability to filter, order, or paginate datatables
  - exception AjaxDatatablesRails::Error::InvalidSearchColumn

Continues:

  - 81853d1ef9
  - 83636afee0
This commit is contained in:
Andrew Kvalheim 2022-03-18 08:46:52 -07:00
parent edec5a98be
commit 2a93d09d22
6 changed files with 10 additions and 9 deletions

View file

@ -51,7 +51,7 @@ class RegistrationDatatable < AjaxDatatablesRails::ActiveRecord
end
# override upstream santitation, which converts everything to strings
def sanitize(records)
def sanitize_data(records)
records
end
end

View file

@ -21,7 +21,8 @@ class UserDatatable < AjaxDatatablesRails::ActiveRecord
email: { source: 'User.email' },
name: { source: 'User.name' },
attended: { source: 'attended_count', searchable: false },
roles: { source: 'Role.name' }
roles: { source: 'Role.name' },
actions: { source: 'User.id', searchable: false, orderable: false }
}
end