Skip to content

Proxy object destroys inheritance feature #585

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

Closed
wants to merge 2 commits into from

Conversation

kayakyakr
Copy link

The tests worked great when the objects just had Elasticsearch::Model::Naming methods included, but that's not how Elasticsearch is used in real life. In real life, the index_name and document_name are accessed through a proxy, and the tree search was not considering that. This adds tests to confirm the infinite loop that this caused, and then fixes it by checking against the proxy object's target.

@kayakyakr
Copy link
Author

Errors are unrelated to code changes.

@tmandke
Copy link
Contributor

tmandke commented Dec 7, 2017

Can this get merged soon. We are facing the same problem.

@jsmestad
Copy link
Contributor

This would be great to get merged!

@karmi
Copy link
Contributor

karmi commented Apr 25, 2018

@jsmestad , @tmandke , @kayakyakr , sorry about the silence here... I still need to focus on other responsibilities currently, but we're scheduling some significant effort for June and onwards to re-focus on the elasticsearch-rails library again, and give it the much needed attention.

@estolfo
Copy link
Contributor

estolfo commented Sep 5, 2018

@kayakyakr Thanks very much for this pull request. Is there any chance you can create a test that uses the actual library code? I'm afraid that if anything changes in the code base, this test will erroneously continue to pass because of the use of the ::ProxiedModel

@estolfo estolfo added the waiting-for-user Waiting for user input to proceed label Sep 5, 2018
@kayakyakr
Copy link
Author

I made some comments in the spec why that wasn't possible: testing against the model itself causes inheritance loops. I'm no longer working on a project that uses this, and so no longer have time set aside in my workday to work on finding a different workaround for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-for-user Waiting for user input to proceed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants