meilisearch / meilisearch-rails

Meilisearch integration for Ruby on Rails
https://www.meilisearch.com
MIT License
308 stars 47 forks source link

will_paginate issue #261

Closed jason-hobbs closed 1 year ago

jason-hobbs commented 1 year ago

I am using the latest Meilisearch gem with the latest Meilisearch runtime on Rails 7.0.5 I am integreating Meilisearch and am trying to use will_paginate. I have my backend set to will_paginate in the config and have wiil_paginate @searchresults in the view. This works well but any page I go to only displays the first page. Do I have to set offset or something similar?

brunoocasali commented 1 year ago

Hi @jason-hobbs!

We have some integration test cases in this repo that are using will_paginate, and they seem to be working fine.

Do you have something like this in your code?

hits = Movie.search 'avenger', hits_per_page: 5, page: 2

jason-hobbs commented 1 year ago

Well turns out I am an idiot. I forgot the page param. Sorry about the ticket.

brunoocasali commented 1 year ago

Don't worry I'm here to help, I'm glad it works 🎉