-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Querying association with unscope(:where) from instance removes conditions #39275
Comments
I'd be happy to try to fix it if someone can point me in the right direction of where the |
I had also tried to fix it in #38929, but some tests expects to unscope required conditions for now. |
@kamipo maybe those tests don't make sense then? |
This issue has been automatically marked as stale because it has not been commented on for at least three months. |
This issue has been automatically marked as stale because it has not been commented on for at least three months. |
Related to #38811. Trying to access an association of an AR instance where the association unscopes
where
no longer raises an exception, but still removes association conditions from the query.Steps to reproduce
See https://gist.github.com/dvandersluis/86eb48649747c763dd06fb1bc35a4321 for a failing test.
Expected behavior
post.comments.to_sql
should returnActual behavior
Unscopes association where clause
System configuration
Rails version: 6.0.3
Ruby version: 2.6.2
The text was updated successfully, but these errors were encountered: