diff options
-rw-r--r-- | activerecord/lib/active_record/associations/join_dependency.rb | 4 |
1 files changed, 2 insertions, 2 deletions
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 |