We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
records.__send__ :load
records.load
1 parent 40f9e7e commit b6d4857Copy full SHA for b6d4857
elasticsearch-model/lib/elasticsearch/model/adapters/active_record.rb
@@ -36,7 +36,7 @@ def records
36
self.__send__(:exec_queries)
37
end
38
@records.sort_by { |record| hits.index { |hit| hit['_id'].to_s == record.id.to_s } }
39
- end
+ end if self
40
41
42
sql_records
@@ -45,7 +45,7 @@ def records
45
# Prevent clash with `ActiveSupport::Dependencies::Loadable`
46
#
47
def load
48
- records.load
+ records.__send__(:load)
49
50
51
# Intercept call to the `order` method, so we can ignore the order from Elasticsearch
0 commit comments