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

Fix preloader to associate preloaded records by default #40056

Merged
merged 1 commit into from Aug 17, 2020

Conversation

kamipo
Copy link
Member

@kamipo kamipo commented Aug 15, 2020

Someone had relied on the behavior that preloading with a given scope,
but the behavior has lost in #35496 to fix the minor bug that unloading
through association.

Basically we don't guarantee the internal behavior, but the bugfix can
be achieved without any breaking change, so I've restored the lost
functionality.

Fixes #36638.
Fixes #37720.

Someone had relied on the behavior that preloading with a given scope,
but the behavior has lost in rails#35496 to fix the minor bug that unloading
through association.

Basically we don't guarantee the internal behavior, but the bugfix can
be achieved without any breaking change, so I've restored the lost
functionality.

Fixes rails#36638.
Fixes rails#37720.
@kamipo kamipo merged commit 4aa6559 into rails:master Aug 17, 2020
@kamipo kamipo deleted the fix_preloader_associate_by_default branch August 17, 2020 03:35
kamipo added a commit that referenced this pull request Aug 17, 2020
Fix preloader to associate preloaded records by default
NoahFisher pushed a commit to simplepractice/rails that referenced this pull request Nov 12, 2020
…_default

Fix preloader to associate preloaded records by default
berowar pushed a commit to simplepractice/rails that referenced this pull request Nov 13, 2020
…_default

Fix preloader to associate preloaded records by default
@reist
Copy link
Contributor

reist commented Apr 12, 2021

Heya, any reason this code is in 6-0-stable for 5+ months, but not in any released 6.0 version?

@qcam
Copy link

qcam commented May 7, 2021

Ping 👋! Thanks for fixing this. Would this be in any 6.0 release soon?

berowar pushed a commit to simplepractice/rails that referenced this pull request May 18, 2021
…_default

Fix preloader to associate preloaded records by default
@coorasse
Copy link
Contributor

@rafaelfranca how come this has been merged almost one year ago and not available in any 6.0.x release? It's a bit weird to me.

@zzak
Copy link
Member

zzak commented May 26, 2021

@coorasse @qcam @reist I'm not sure if rails-core will cut a release for 6.0.x including this (or if they haven't already) -- but as a workaround have you tried pointing your Gemfile at 6-0-stable branch? I know this probably isn't ideal but it's less likely for bugs to be backported to a previous stable branch and if you're really blocked by this bug it might be worth the risk. 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants