Skip to content

Commit 9bbeadd

Browse files
committed
[MODEL] Use __send__, not send in ActiveRecord's __find_in_batches
Fixes 9b0e0d0
1 parent 14abe96 commit 9bbeadd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

elasticsearch-model/lib/elasticsearch/model/adapters/active_record.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ module Importing
8585
def __find_in_batches(options={}, &block)
8686
named_scope = options.delete(:scope)
8787

88-
scope = named_scope ? self.send(named_scope) : self
88+
scope = named_scope ? self.__send__(named_scope) : self
8989

9090
scope.find_in_batches(options) do |batch|
9191
batch_for_bulk = batch.map { |a| { index: { _id: a.id, data: a.__elasticsearch__.as_indexed_json } } }

0 commit comments

Comments
 (0)