1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test/cases/scoping
Matthew Draper 5c6d365383 Skip the STI condition when evaluating a default scope
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.
2016-01-12 05:43:58 +10:30
..
default_scoping_test.rb Skip the STI condition when evaluating a default scope 2016-01-12 05:43:58 +10:30
named_scoping_test.rb
relation_scoping_test.rb Active scopes apply to child classes, though not parents/siblings 2016-01-12 05:43:58 +10:30