We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c44370 commit 10ed5caCopy full SHA for 10ed5ca
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
@@ -48,6 +48,7 @@ def self.search(query, options={})
48
49
50
DummyIncludingModel.__send__ :include, Elasticsearch::Model
51
+ DummyIncludingModelWithSearchMethodDefined.__send__ :include, Elasticsearch::Model
52
53
54
after(:all) do
0 commit comments