Commit 5641b80d7e25ae7805a2bf44dcb3877914c723fc

Authored by Andrew Kane
1 parent 15bd18d2

Added comment [skip ci]

Showing 1 changed file with 3 additions and 0 deletions   Show diff stats
lib/searchkick/relation_indexer.rb
... ... @@ -70,6 +70,9 @@ module Searchkick
70 70 # prevent scope from affecting search_data as well as inline jobs
71 71 # Active Record runs relation calls in scoping block
72 72 # https://github.com/rails/rails/blob/main/activerecord/lib/active_record/relation/delegation.rb
  73 + # note: we could probably just call klass.current_scope = nil
  74 + # anywhere in reindex method (after initial all call),
  75 + # but this is more cautious
73 76 previous_scope = klass.current_scope(true)
74 77 if previous_scope
75 78 begin
... ...