From 9e60f0f630f5e122296d05da0cf2d3b3d55526a5 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 23 Sep 2013 17:10:23 -0700 Subject: pass the preloader down so we only have to construct one --- .../lib/active_record/associations/preloader/has_and_belongs_to_many.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/associations/preloader/has_and_belongs_to_many.rb') 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 = {} -- cgit v1.2.3