Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hash with indifferent access for hits #404

Open
RealSilo opened this issue Aug 6, 2021 · 0 comments
Open

Hash with indifferent access for hits #404

RealSilo opened this issue Aug 6, 2021 · 0 comments

Comments

@RealSilo
Copy link

RealSilo commented Aug 6, 2021

  • Rails version: gem 'rails', '~> 6.1.3.1'
  • Algolia Rails integration version: gem 'algoliasearch-rails', '~> 2.1', '>= 2.1.1'
  • Algolia Client Version: #.#.#
  • Language Version: ruby '2.7.1'

Description

In the def algolia_search function:

json = algolia_raw_search(q, params)
hit_ids = json['hits'].map { |hit| hit['objectID'] }

This throws an error as the hash uses symbol keys in the new version but the access uses string keys.

Steps To Reproduce

Just upgraded to 2.1.1. Simply use search (not raw)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant