Permalink
Browse files

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
  • Loading branch information...
1 parent 8e1b363 commit 18a74f9bbafd55e30d7590013c1a260f16242385 @tenderlove tenderlove committed Oct 3, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/associations/join_dependency.rb
@@ -35,7 +35,7 @@ def initialize(base, associations, joins)
@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 @@ def cache_joined_association(association)
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

0 comments on commit 18a74f9

Please sign in to comment.