• M
    Skip the STI condition when evaluating a default scope · 5c6d3653
    Matthew Draper 提交于
    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.
    5c6d3653
default.rb 5.2 KB