1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #28267 from rails/rm-node-from-constraints

Remove `node` parameter to `join_constraints`
This commit is contained in:
Aaron Patterson 2017-03-03 11:09:57 -08:00 committed by GitHub
commit 76be78c59c
2 changed files with 3 additions and 3 deletions

View file

@ -171,7 +171,7 @@ module ActiveRecord
chain = child.reflection.chain chain = child.reflection.chain
foreign_table = parent.table foreign_table = parent.table
foreign_klass = parent.base_klass foreign_klass = parent.base_klass
child.join_constraints(foreign_table, foreign_klass, child, join_type, tables, chain) child.join_constraints(foreign_table, foreign_klass, join_type, tables, chain)
end end
def make_outer_joins(parent, child) def make_outer_joins(parent, child)

View file

@ -23,7 +23,7 @@ module ActiveRecord
JoinInformation = Struct.new :joins, :binds JoinInformation = Struct.new :joins, :binds
def join_constraints(foreign_table, foreign_klass, node, join_type, tables, chain) def join_constraints(foreign_table, foreign_klass, join_type, tables, chain)
joins = [] joins = []
binds = [] binds = []
tables = tables.reverse tables = tables.reverse
@ -46,7 +46,7 @@ module ActiveRecord
item item
else else
ActiveRecord::Relation.create(klass, table, predicate_builder) ActiveRecord::Relation.create(klass, table, predicate_builder)
.instance_exec(node, &item) .instance_exec(&item)
end end
end end