acechase
2008-Dec-10 21:46 UTC
[PATCH] Fix to association_preload #preload_one_association
I fixed a bug in ActiveRecord::AssociationPreload::preload_one_association. The bug is relatively obvious if you''re familiar with that preload code, here''s my lighthouse ticket with patch: http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1554-fix-to-eager-loading-on-polymorphic-associations This can be a very difficult bug to detect because the code thinks it has loaded the associations correctly, but the where clause in the query is incorrect so the actual records that get associated will either be absent or of the wrong polymorphic type. cheers, ac --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---