This project is archived and is in readonly mode.
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
-
acechase December 10th, 2008 @ 11:30 PM
It's a similar problem. In #546 the problem was that the records were not being grouped by class at all. Now, records are being grouped by class appropriately, but the #send that's happening after grouping is using the class the module is being included in, rather than the class the records are from.
-
Jeremy Kemper December 11th, 2008 @ 01:37 AM
- Assigned user set to Jeremy Kemper
- State changed from new to open
- Milestone cleared.
-
Jeremy Kemper January 10th, 2009 @ 08:06 PM
- State changed from open to stale
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>