pass the join type to the join_constraints method

This commit is contained in:
Aaron Patterson 2013-10-20 13:11:38 -07:00
parent 2549f6d8ee
commit bae5e02cf3
2 changed files with 3 additions and 2 deletions

@ -165,7 +165,8 @@ def instantiate(result_set, aliases)
def make_joins(node)
node.children.flat_map { |child|
child.join_constraints(node, child.tables, child.reflection.chain)
chain = child.reflection.chain
child.join_constraints(node, child.join_type, child.tables, chain)
.concat make_joins(child)
}
end

@ -25,7 +25,7 @@ def match?(other)
super && reflection == other.reflection
end
def join_constraints(parent, tables, chain)
def join_constraints(parent, join_type, tables, chain)
joins = []
tables = tables.reverse