Skip to content

Commit 76be78c

Browse files
authored
Merge pull request #28267 from rails/rm-node-from-constraints
Remove `node` parameter to `join_constraints`
2 parents fd8da71 + 6a96285 commit 76be78c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

activerecord/lib/active_record/associations/join_dependency.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def make_constraints(parent, child, tables, join_type)
171171
chain = child.reflection.chain
172172
foreign_table = parent.table
173173
foreign_klass = parent.base_klass
174-
child.join_constraints(foreign_table, foreign_klass, child, join_type, tables, chain)
174+
child.join_constraints(foreign_table, foreign_klass, join_type, tables, chain)
175175
end
176176

177177
def make_outer_joins(parent, child)

activerecord/lib/active_record/associations/join_dependency/join_association.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def match?(other)
2323

2424
JoinInformation = Struct.new :joins, :binds
2525

26-
def join_constraints(foreign_table, foreign_klass, node, join_type, tables, chain)
26+
def join_constraints(foreign_table, foreign_klass, join_type, tables, chain)
2727
joins = []
2828
binds = []
2929
tables = tables.reverse
@@ -46,7 +46,7 @@ def join_constraints(foreign_table, foreign_klass, node, join_type, tables, chai
4646
item
4747
else
4848
ActiveRecord::Relation.create(klass, table, predicate_builder)
49-
.instance_exec(node, &item)
49+
.instance_exec(&item)
5050
end
5151
end
5252

0 commit comments

Comments
 (0)