aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-10-21 14:56:46 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2013-10-21 14:56:46 -0700
commitfadb6d923beb5a45650e6bb73c238538917c25e4 (patch)
tree1d00ba76041b790def1ed5819851ebe8eb93bb27 /activerecord/lib/active_record/associations
parentaa5affbff3e89efcefa728cb127c5d8eed993370 (diff)
downloadrails-fadb6d923beb5a45650e6bb73c238538917c25e4.tar.gz
rails-fadb6d923beb5a45650e6bb73c238538917c25e4.tar.bz2
rails-fadb6d923beb5a45650e6bb73c238538917c25e4.zip
join_type isn't used on the node anymore
Diffstat (limited to 'activerecord/lib/active_record/associations')
-rw-r--r--activerecord/lib/active_record/associations/join_dependency.rb12
-rw-r--r--activerecord/lib/active_record/associations/join_dependency/join_association.rb6
2 files changed, 7 insertions, 11 deletions
diff --git a/activerecord/lib/active_record/associations/join_dependency.rb b/activerecord/lib/active_record/associations/join_dependency.rb
index fb893da0da..2bcea3b00a 100644
--- a/activerecord/lib/active_record/associations/join_dependency.rb
+++ b/activerecord/lib/active_record/associations/join_dependency.rb
@@ -57,7 +57,7 @@ module ActiveRecord
@alias_tracker = AliasTracker.new(base.connection, joins)
@alias_tracker.aliased_name_for(base.table_name) # Updates the count for base.table_name to 1
tree = self.class.make_tree associations
- build tree, @join_root, Arel::InnerJoin
+ build tree, @join_root
@join_root.children.each { |child| construct_tables! @join_root, child }
end
@@ -213,23 +213,23 @@ module ActiveRecord
raise ConfigurationError, "Association named '#{ name }' was not found on #{ klass.name }; perhaps you misspelled it?"
end
- def build(associations, parent, join_type)
+ def build(associations, parent)
associations.each do |name, right|
reflection = find_reflection parent.base_klass, name
- join_association = build_join_association reflection, parent, join_type
+ join_association = build_join_association reflection
parent.children << join_association
- build right, join_association, join_type
+ build right, join_association
end
end
- def build_join_association(reflection, parent, join_type)
+ def build_join_association(reflection)
reflection.check_validity!
if reflection.options[:polymorphic]
raise EagerLoadPolymorphicError.new(reflection)
end
- JoinAssociation.new(reflection, join_type)
+ JoinAssociation.new(reflection)
end
def construct(ar_parent, parent, row, rs, seen, model_cache, aliases)
diff --git a/activerecord/lib/active_record/associations/join_dependency/join_association.rb b/activerecord/lib/active_record/associations/join_dependency/join_association.rb
index 4a70dc9e26..d2c090ae56 100644
--- a/activerecord/lib/active_record/associations/join_dependency/join_association.rb
+++ b/activerecord/lib/active_record/associations/join_dependency/join_association.rb
@@ -7,16 +7,12 @@ module ActiveRecord
# The reflection of the association represented
attr_reader :reflection
- # What type of join will be generated, either Arel::InnerJoin (default) or Arel::OuterJoin
- attr_accessor :join_type
-
attr_accessor :tables
- def initialize(reflection, join_type)
+ def initialize(reflection)
super(reflection.klass)
@reflection = reflection
- @join_type = join_type
@tables = nil
end