algoliasearch-rails icon indicating copy to clipboard operation
algoliasearch-rails copied to clipboard

[Pagination] Add better integration with Backend pagination

Open yordis opened this issue 10 years ago • 6 comments

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.

yordis avatar Oct 03 '15 08:10 yordis

@redox can you check this please

yordis avatar Oct 03 '15 08:10 yordis

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.

yordis avatar Oct 03 '15 08:10 yordis

Thanks for contributing @yordis, I'll have a look!

redox avatar Oct 04 '15 09:10 redox

@redox any update on this

yordis avatar Nov 19 '15 20:11 yordis

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 avatar Apr 24 '16 08:04 redox

@redox I have long time without touch algolia but I will try to do something!

yordis avatar Apr 24 '16 10:04 yordis