Closed kingp0dd closed 10 years ago
I'm very sorry. Forgot to include pagination gems
Don't worry. Glad you could solve it :)
Anyway, the important thing is, if we can be of any help, don't hesitate in opening an issue or contacting us.
Cheers!
For those who get this, but do have the gems installed please do not forget to uncomment one of the lines: class MyDatatable < AjaxDatatablesRails::Base
hey I have uncommented the pagination module and tried for will_paginate and kaminari both, but sorting, searching, pagination are not working, whats the reason my code is https://github.com/antillas21/ajax-datatables-rails/issues/62
@coderawal can you try using the most basic of them? AjaxDataTablesRails::Extensions::SimplePaginator
? this will go directly to ActiveRecord
methods.
@coderawal also, could you please remove this line from your controller?
respond_to :json, only: [:update]
Don't know (not sure) if the fact that you're limiting access to respond to json requests in any action that is not update
may be causing the problem.
Thnx antillas21, the problem was with key names in js files. I was using "bProcessing", "bServerSide", "sAjaxSource", "sPaginationType" instead of "processing", "serverSide", "ajax", "pagingType", doesn't both keys does same thing, got solution but i'm not clear why this short of behaviours.
@coderawal glad that you could debug it :smile:
You are right, both keys do the same thing... the difference comes from a change in the jquery.dataTables
(plugin) API... keys that start with a hint on the value type they manage: bServerSide, sAjaxSource, sPaginationType, etc
belong to the plugin's 1.9 version (now legacy), while the keys serverSide, processing, ajax, paginationType, etc
belong to the plugin's 1.10 version (now current and stable).
We added some notes at the beginning of our gem's README
to inform users about jquery.dataTables
plugin changes in the API when this happened.
Hi,
I've been trying to fix this but to no success. I am getting the following error while loading the ajax data:
Upon checking the ajax response:
My javascript looks like:
Please shed some light. Thank you.