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