Remove outdated comment in ActiveRecord::Associations::AssociationScope#add_constraints [ci skip]

This comment was correct when it was added in 65843e1. In that commit, ActiveRecord::AssociationScope#scope applies the nearest association's scope, and #add_constraints skips it.

c8d8899 made the comment incorrect. It modified #scope not to apply the nearest association's scope and #add_constraints to apply scopes for the entire association chain.
This commit is contained in:
George Claghorn 2021-07-24 17:49:19 -04:00
parent 2a6459d8ca
commit 3fa7dce079
1 changed files with 0 additions and 2 deletions

View File

@ -123,8 +123,6 @@ module ActiveRecord
chain_head = chain.first
chain.reverse_each do |reflection|
# Exclude the scope of the association itself, because that
# was already merged in the #scope method.
reflection.constraints.each do |scope_chain_item|
item = eval_scope(reflection, scope_chain_item, owner)