Skip to content

[MODEL] Do not override existing methods #936

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 19, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[MODEL] Do not override existing methods
  • Loading branch information
Michael Chen committed Apr 22, 2020
commit 12371b4198edb2c24b6b675f3acc5cd731946d48
2 changes: 1 addition & 1 deletion elasticsearch-model/lib/elasticsearch/model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def self.included(base)
# Delegate common methods to the `__elasticsearch__` ClassMethodsProxy, unless they are defined already
class << self
METHODS.each do |method|
delegate method, to: :__elasticsearch__ unless self.respond_to?(method)
delegate method, to: :__elasticsearch__ unless self.public_instance_methods.include?(method)
end
end
end
Expand Down