-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Allow to unscope where conditions by arel_table with symbol #17881
Conversation
Could you add a test case not using |
Hmm, I can't. Using But there are some test cases using
It causes misunderstanding. IMO, even though |
Inside the framework it is allowed to use the private API. The point is, right now application can use it but we don't have any guarantee these methods will be not removed, the behaviour changed without notice, or even renamed. I know there are a lot of things that can only be done using About your specific case, lets add a test using |
Thanks, I understand your point. |
Seems a good place |
This commit fixes the following case. User.where(User.arel_table[:created_at].lteq(1.year.ago)).unscope(where :created_at)
e256627
to
66b84c9
Compare
Thanks. Added tests and rebased. |
Allow to unscope where conditions by arel_table with symbol
This commit fixes the following case.
reproduction on rails console
I guess it works before this commit. 492bad7