We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5acfc78 commit f71b888Copy full SHA for f71b888
elasticsearch-model/lib/elasticsearch/model.rb
@@ -112,7 +112,7 @@ def self.included(base)
112
# Delegate common methods to the `__elasticsearch__` ClassMethodsProxy, unless they are defined already
113
class << self
114
METHODS.each do |method|
115
- delegate method, to: :__elasticsearch__ unless self.respond_to?(method)
+ delegate method, to: :__elasticsearch__ unless self.public_instance_methods.include?(method)
116
end
117
118
elasticsearch-model/spec/elasticsearch/model/module_spec.rb
@@ -47,7 +47,7 @@ def self.search(query, options={})
47
48
49
50
- DummyIncludingModel.__send__ :include, Elasticsearch::Model
+ DummyIncludingModelWithSearchMethodDefined.__send__ :include, Elasticsearch::Model
51
52
53
after(:all) do
0 commit comments