Commit d0d42d9da396f2118c8004ea17c2916d93e9e516

Authored by Andrew Kane
1 parent 367cb91a

Skip inherited scope [skip ci]

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
lib/searchkick/relation_indexer.rb
... ... @@ -68,7 +68,7 @@ module Searchkick
68 68 # remove order to prevent possible warnings
69 69 relation.except(:order).find_in_batches(batch_size: batch_size) do |batch|
70 70 # prevent scope from affecting search_data as well as inline jobs
71   - previous_scope = klass.current_scope
  71 + previous_scope = klass.current_scope(true)
72 72 begin
73 73 klass.current_scope = nil
74 74 yield batch
... ...