algolia / algoliasearch-rails

AlgoliaSearch integration to your favorite ORM
MIT License
409 stars 119 forks source link

Hash with indifferent access for hits #404

Open RealSilo opened 3 years ago

RealSilo commented 3 years ago

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)