Commit 64fbf6e50cc3ead8b6a0dc49ddc69fe64abf0207

Authored by Andrew Kane
1 parent cff0e646

Prevent exists? check if records is a relation [skip ci]

Showing 1 changed file with 2 additions and 0 deletions   Show diff stats
lib/searchkick/record_indexer.rb
... ... @@ -7,6 +7,8 @@ module Searchkick
7 7 end
8 8  
9 9 def reindex(records, mode:, method_name:, full: false, single: false)
  10 + # prevents exists? check if records is a relation
  11 + records = records.to_a
10 12 return if records.empty?
11 13  
12 14 case mode
... ...