This project is archived and is in readonly mode.

#1554 ✓stale
acechase

fix to eager loading on polymorphic associations

Reported by acechase | December 10th, 2008 @ 09:39 PM

We need to be sure to invoke the preload_XXX_associations method on the proper class, otherwise loading polymorphic associations will not work properly. It breaks on polymorphic associations because the polymorphic foreign key uses the local class as the name to use in the where clause (e.g. ['WHERE association_type = ?', class.name]).

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Pages