mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
5c6d365383
Given a default_scope on a parent of the current class, where that parent is not the base class, the parent's STI condition would become attached to the evaluated default scope, and then override the child's own STI condition. Instead, we can treat the STI condition as though it is a default scope, and skip it in this situation: the scope will be merged into the base relation, which already contains the correct STI condition. Fixes #22426. |
||
---|---|---|
.. | ||
default_scoping_test.rb | ||
named_scoping_test.rb | ||
relation_scoping_test.rb |