From 7f4975ffc618bc3125039c565507a385c1187183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Fri, 15 Feb 2013 13:00:53 -0200 Subject: Revert "Merge pull request #9252 from senny/8423_hmt_preloading_bug" This reverts commit c5451777b038c5e48567f69256986ae42a2cde48. Conflicts: activerecord/CHANGELOG.md --- .../lib/active_record/associations/preloader/through_association.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'activerecord/lib/active_record/associations/preloader/through_association.rb') diff --git a/activerecord/lib/active_record/associations/preloader/through_association.rb b/activerecord/lib/active_record/associations/preloader/through_association.rb index 0f1336bd00..ad6374d09a 100644 --- a/activerecord/lib/active_record/associations/preloader/through_association.rb +++ b/activerecord/lib/active_record/associations/preloader/through_association.rb @@ -37,8 +37,7 @@ module ActiveRecord through_records = Array.wrap(owner.send(through_reflection.name)) # Dont cache the association - we would only be caching a subset - if (through_scope != through_reflection.klass.unscoped) || - (reflection.options[:source_type] && through_reflection.collection?) + if reflection.options[:source_type] && through_reflection.collection? owner.association(through_reflection.name).reset end -- cgit v1.2.3