Permalink
Browse files

unhook `join_constraints` from the @tables ivar

  • Loading branch information...
tenderlove committed Oct 14, 2013
1 parent a11882c commit 71250a5ae575277379cc4fabf62baf60583ee0b9
@@ -119,7 +119,7 @@ def instantiate(result_set)
def make_joins(node)
node.children.flat_map { |child|
- child.join_constraints(node).concat make_joins(child)
+ child.join_constraints(node, child.tables).concat make_joins(child)
}
end
@@ -33,9 +33,9 @@ def match?(other)
super && reflection == other.reflection
end
- def join_constraints(parent)
+ def join_constraints(parent, tables)
joins = []
- tables = @tables.dup
+ tables = tables.dup
foreign_table = parent.table
foreign_klass = parent.base_klass

0 comments on commit 71250a5

Please sign in to comment.