From 18a74f9bbafd55e30d7590013c1a260f16242385 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 3 Oct 2013 15:17:50 -0700 Subject: Always pass parameters to `build` We always know the parameters in advance, so we don't need to build it in to the method signature --- activerecord/lib/active_record/associations/join_dependency.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord/lib/active_record/associations') diff --git a/activerecord/lib/active_record/associations/join_dependency.rb b/activerecord/lib/active_record/associations/join_dependency.rb index b6bd37d3cb..117f027fed 100644 --- a/activerecord/lib/active_record/associations/join_dependency.rb +++ b/activerecord/lib/active_record/associations/join_dependency.rb @@ -35,7 +35,7 @@ module ActiveRecord @reflections = [] @alias_tracker = AliasTracker.new(base.connection, joins) @alias_tracker.aliased_name_for(base.table_name) # Updates the count for base.table_name to 1 - build(associations) + build(associations, join_parts.last, Arel::InnerJoin) end def graft(*associations) @@ -130,7 +130,7 @@ module ActiveRecord ref[association.reflection.name] ||= {} end - def build(associations, parent = join_parts.last, join_type = Arel::InnerJoin) + def build(associations, parent, join_type) case associations when Symbol, String reflection = parent.reflections[associations.intern] or -- cgit v1.2.3