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
Sean Griffin 5e0b555b45 current_scope shouldn't pollute sibling STI classes
It looks like the only reason `current_scope` was thread local on
`base_class` instead of `self` is to ensure that when we call a named
scope created with a proc on the parent class, it correctly uses the
default scope of the subclass. The reason this wasn't happening was
because the proc captured `self` as the parent class, and we're not
actually defining a real method. Using `instance_exec` fixes the
problem.

Fixes #18806
2015-02-11 13:46:30 -07:00
..
default_scoping_test.rb WhereClause#predicates does not need to be public 2015-01-27 10:30:38 -07:00
named_scoping_test.rb WhereClause#predicates does not need to be public 2015-01-27 10:30:38 -07:00
relation_scoping_test.rb current_scope shouldn't pollute sibling STI classes 2015-02-11 13:46:30 -07:00