Commit 18770f8bf938c34eb92fe35853dd95fba9a0af6e
1 parent
15e00f0a
Exists in
master
and in
2 other branches
Remove order to prevent possible warnings [skip ci]
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
lib/searchkick/relation_indexer.rb
... | ... | @@ -74,7 +74,8 @@ module Searchkick |
74 | 74 | |
75 | 75 | def in_batches(relation, &block) |
76 | 76 | if relation.respond_to?(:find_in_batches) |
77 | - relation.find_in_batches(batch_size: batch_size, &block) | |
77 | + # remove order to prevent possible warnings | |
78 | + relation.except(:order).find_in_batches(batch_size: batch_size, &block) | |
78 | 79 | else |
79 | 80 | each_batch(relation, batch_size: batch_size, &block) |
80 | 81 | end | ... | ... |