Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

AR preload_associations not available anymore #3022

Closed
mrreynolds opened this Issue Sep 14, 2011 · 3 comments

Comments

Projects
None yet
3 participants
Contributor

mrreynolds commented Sep 14, 2011

Either the ActiveRecord method preload_associations has been removed or renamed. What's the alternative? An explanation why this has been removed, would be much appreciated.

Member

arunagw commented Sep 15, 2011

Seems like removed here d90b4e2

Not sure why.

/cc @jonleighton

@jonleighton jonleighton was assigned Sep 15, 2011

Member

jonleighton commented Sep 15, 2011

Hmm, yes, I didn't really think this was a public API, but I guess I should add a deprecation. The new way to do it is:

ActiveRecord::Associations::Preloader.new(records, associations).run
Contributor

mrreynolds commented Sep 15, 2011

True that. But there are definitely edge cases where manually calling preload_associations made sense. Thanks for the hint!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment