Skip to content

Commit

Permalink
pass the join type to the join_constraints method
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Oct 20, 2013
1 parent 2549f6d commit bae5e02
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit bae5e02

Please sign in to comment.