Skip to content

current_page Method Missing After Upgrading meilisearch-rails #394

@dlackty

Description

@dlackty

Description
After upgrading to the latest version (0.41.2) of meilisearch-rails, the current_page method is no longer available on the search result object when using Kaminari pagination. I downgraded to 0.41.1 and it works again. Related #376

Expected behavior
Calling .current_page on the search results should return the current page number.

Current behavior
Calling .current_page results in a NoMethodError:

Screenshots or Logs

talks = Talk.search(query_term, hits_per_page: 10, page: page)
talks.count 
# => 1
talks.current_page
# => NoMethodError: undefined method `current_page' for [#<Talk id: 1111>]:MeiliSearch::Rails::Pagination::Kaminari (NoMethodError)

Environment (please complete the following information):

  • OS: macOS
  • Meilisearch server version: 1.4.0
  • meilisearch-rails version: 0.41.2
  • Rails version: 6.1.7.10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions