aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-10-03 15:17:50 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2013-10-03 15:17:50 -0700
commit18a74f9bbafd55e30d7590013c1a260f16242385 (patch)
treef9ba4d9525f9f3b0bd1390fcab4b12c1b3c90da8 /activerecord
parent8e1b363167c22adcf75e3454dc8bfd34b5801d79 (diff)
downloadrails-18a74f9bbafd55e30d7590013c1a260f16242385.tar.gz
rails-18a74f9bbafd55e30d7590013c1a260f16242385.tar.bz2
rails-18a74f9bbafd55e30d7590013c1a260f16242385.zip
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
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/associations/join_dependency.rb4
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