diff --git a/elasticsearch-model/lib/elasticsearch/model/adapters/active_record.rb b/elasticsearch-model/lib/elasticsearch/model/adapters/active_record.rb index 23c4267fa..6d616a2c7 100644 --- a/elasticsearch-model/lib/elasticsearch/model/adapters/active_record.rb +++ b/elasticsearch-model/lib/elasticsearch/model/adapters/active_record.rb @@ -102,7 +102,7 @@ def __find_in_batches(options={}, &block) scope = scope.__send__(named_scope) if named_scope scope = scope.instance_exec(&query) if query - scope.find_in_batches(options) do |batch| + scope.find_in_batches(**options) do |batch| yield (preprocess ? self.__send__(preprocess, batch) : batch) end end