diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-03-04 22:36:44 +0000 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-03-04 22:36:44 +0000 |
commit | 4206eff1895dccadcbec471798bfbd129404cc94 (patch) | |
tree | 9a7b1394ac2a60c2f2681411c8db721337fc60de /activerecord/lib | |
parent | b5b5558d2f5347707862b8eeb1816da7c02a1d90 (diff) | |
download | rails-4206eff1895dccadcbec471798bfbd129404cc94.tar.gz rails-4206eff1895dccadcbec471798bfbd129404cc94.tar.bz2 rails-4206eff1895dccadcbec471798bfbd129404cc94.zip |
Stop identity-mapping the through records in the preloader since I fixed the underlying problem in the habtm preloader.
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/associations/preloader/through_association.rb | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/associations/preloader/through_association.rb b/activerecord/lib/active_record/associations/preloader/through_association.rb index 30558ae29c..ad6374d09a 100644 --- a/activerecord/lib/active_record/associations/preloader/through_association.rb +++ b/activerecord/lib/active_record/associations/preloader/through_association.rb @@ -33,13 +33,8 @@ module ActiveRecord through_options ).run - # TODO: Verify that this is actually necessary and not just a symptom of an - # underlying inefficiency - identity_map = {} - Hash[owners.map do |owner| through_records = Array.wrap(owner.send(through_reflection.name)) - through_records.map! { |record| identity_map[record] ||= record } # Dont cache the association - we would only be caching a subset if reflection.options[:source_type] && through_reflection.collection? |