Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

join_type isn't used on the node anymore

  • Loading branch information...
commit fadb6d923beb5a45650e6bb73c238538917c25e4 1 parent aa5affb
@tenderlove tenderlove authored
View
12 activerecord/lib/active_record/associations/join_dependency.rb
@@ -57,7 +57,7 @@ def initialize(base, associations, joins)
@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 @@ def find_reflection(klass, name)
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)
View
6 activerecord/lib/active_record/associations/join_dependency/join_association.rb
@@ -7,16 +7,12 @@ class JoinAssociation < JoinPart # :nodoc:
# 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
Please sign in to comment.
Something went wrong with that request. Please try again.