Skip to content
New issue

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

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

Already on GitHub? # to your account

[MODEL]respond_to_missing? to silence Ruby 2.4 warnings #838

Merged
merged 1 commit into from
Oct 17, 2018

Conversation

emptyflask
Copy link
Contributor

I ran into a bunch of warnings when using Elastic results with
Ruby 2.4+ and trailblazer/cells, because #method_missing? without
#respond_to_missing? makes Forwardable think all of the Result
attributes are private methods.

https://robots.thoughtbot.com/always-define-respond-to-missing-when-overriding

I ran into a bunch of warnings when using Elastic results with
Ruby 2.4+ and trailblazer/cells, because `#method_missing?` without
`#respond_to_missing?` makes Forwardable think all of the Result
attributes are private methods.

https://robots.thoughtbot.com/always-define-respond-to-missing-when-overriding
@emptyflask
Copy link
Contributor Author

Apologies to @nutsoriginal, I didn't see his PR (#727) until opening this one. Anyway, this has some test coverage.

@emptyflask emptyflask changed the title respond_to_missing? to silence Ruby 2.4 warnings [MODEL]respond_to_missing? to silence Ruby 2.4 warnings Sep 18, 2018
@emptyflask
Copy link
Contributor Author

I've signed the CLA.

@estolfo
Copy link
Contributor

estolfo commented Oct 17, 2018

Thanks @emptyflask and @nutsoriginal

@estolfo estolfo merged commit 3f2c03f into elastic:master Oct 17, 2018
estolfo pushed a commit that referenced this pull request Oct 17, 2018
I ran into a bunch of warnings when using Elastic results with
Ruby 2.4+ and trailblazer/cells, because `#method_missing?` without
`#respond_to_missing?` makes Forwardable think all of the Result
attributes are private methods.

https://robots.thoughtbot.com/always-define-respond-to-missing-when-overriding
@emptyflask emptyflask deleted the fix/respond_to branch April 24, 2019 14:08
vanboom added a commit to vanboom/elasticsearch-rails that referenced this pull request Nov 10, 2023
…nt, fix index name to klass lookup methodology
vanboom added a commit to vanboom/elasticsearch-rails that referenced this pull request Nov 11, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants