-
Notifications
You must be signed in to change notification settings - Fork 616
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
#import method conflicts #494
Comments
@zdennis this seems to be reported enough that I'm wondering if we should consider renaming |
Here's a quick stab at an update that should maintain backwards compatibility: master...jkowens:alias_import_method cc: @zdennis |
That's great. The |
Haha thanks, but I have to credit the Ransack team for that nifty trick. They do something similar with the |
@jkowens, this is great. My only question is should we Use the second argument to ‘respond_to?’ to be extra safe that we aren’t clobbering anything? |
@zdennis This should be alright, as the second argument is for private methods. And even if there is an import method in a private scope, it doesn't concern us. We only care if there is an |
@zdennis that seems like a good thought to me. We might as well try to avoid clobbering private methods if possible. I’ll go ahead and update the PR. |
@zdennis interestingly, making this change reveals that JRuby provides a private I'm a bit on the fence now. If we don't create an |
I believe the best solution is to keep it as is, update the documentation to explicitly recommend using Only a very small amount of JRuby people will notice a problem if they are And you can drop the old |
@zdennis I think I'm going to with what I believe @itay-grudev is suggesting and only check the public method scope when adding the |
elasticsearch-rails
uses the methodimport
for importing data into ES. And while I am contradicted about which library holds stronger right to theimport
keyword, would you consider renaming the method tobulk_import
or at least create an alias? I believe in general it would be nice to not use such a generic method name for an external library with such a specific function.The text was updated successfully, but these errors were encountered: