algoliasearch-rails
algoliasearch-rails copied to clipboard
[Pagination] Add better integration with Backend pagination
Right now we validate the page parameter here but we missed the hitsPerPage and my queries are failing because I am not seding any value. The value is nil.
At least kaminari (because is the only I use) when you pass nil per_page (the limit) it will use the default from the Model or use the default from the global so I can read directly from params[:limit] without any worries.
Will be good if we add more integration with the backend paginations.
@redox can you check this please
Do something like this from will_paginate or like this in kaminari
The only concern is about the Model because we can use Model.default_per_page for kaminari or Model. per_page for will_paginate but at that moment we don't have the Model so we lose the configuration per Model.
Thanks for contributing @yordis, I'll have a look!
@redox any update on this
Hey @yordis, sorry for the late reply; I would be happy merging a PR about this. Any chance you have time to submit one?
@redox I have long time without touch algolia but I will try to do something!