mirror of https://github.com/rails/rails
Remove outdated comment in ActiveRecord::Associations::AssociationScope#add_constraints [ci skip]
This comment was correct when it was added in65843e1
. 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:
parent
2a6459d8ca
commit
3fa7dce079
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue