Skip to content
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

Apply default scope conditions for association joins #426

Merged

Conversation

avit
Copy link
Contributor

@avit avit commented Sep 3, 2014

Avoid selecting records from joins that would normally be filtered out if they were selected from the base table. Only applies to Rails 3, as this issue was fixed since Rails 4.

Avoid selecting records from joins that would normally be filtered out
if they were selected from the base table. Only applies to Rails 3, as
this issue was fixed since Rails 4.
jonatack added a commit that referenced this pull request Sep 4, 2014
Apply default scope conditions for association joins
@jonatack jonatack merged commit ee3d8c7 into activerecord-hackery:master Sep 4, 2014
@jonatack
Copy link
Contributor

jonatack commented Sep 4, 2014

Thanks @avit.

Is the intermediate default_scope variable only for readability?

@avit
Copy link
Contributor Author

avit commented Sep 4, 2014

Yeah, so much deep digging into AR internals... it's actually a scoped "relation" not a "scope" which might be unclear from reading.

jonatack added a commit that referenced this pull request Jul 18, 2015
Completes PRs #562, #498, #426, #560 and #537 among others.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants