diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-09-23 17:10:23 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-09-23 17:10:23 -0700 |
commit | 9e60f0f630f5e122296d05da0cf2d3b3d55526a5 (patch) | |
tree | 593ceadd9ef062164e03d12ea9ea1dffe292715b /activerecord/lib/active_record/associations/preloader/has_and_belongs_to_many.rb | |
parent | f34d46ab824e3db121d0e02c7859b6aceb8093d9 (diff) | |
download | rails-9e60f0f630f5e122296d05da0cf2d3b3d55526a5.tar.gz rails-9e60f0f630f5e122296d05da0cf2d3b3d55526a5.tar.bz2 rails-9e60f0f630f5e122296d05da0cf2d3b3d55526a5.zip |
pass the preloader down so we only have to construct one
Diffstat (limited to 'activerecord/lib/active_record/associations/preloader/has_and_belongs_to_many.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/preloader/has_and_belongs_to_many.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/preloader/has_and_belongs_to_many.rb b/activerecord/lib/active_record/associations/preloader/has_and_belongs_to_many.rb index fce3cb78e0..bd72bbc56f 100644 --- a/activerecord/lib/active_record/associations/preloader/has_and_belongs_to_many.rb +++ b/activerecord/lib/active_record/associations/preloader/has_and_belongs_to_many.rb @@ -34,7 +34,7 @@ module ActiveRecord # Once we have used the join table column (in super), we manually instantiate the # actual records, ensuring that we don't create more than one instances of the same # record - def associated_records_by_owner + def associated_records_by_owner(preloader) return @associated_records_by_owner if @associated_records_by_owner records = {} |