-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
For class Foo with has_many Bar with a default_scope, I believe foo.bars should be scoped. It currently is not, but foo.bars.all is.
Steps to repro:
Create a model Foo with a has_many to model Bar.
Create an attribute in Bar on which to scope.
Create a default scope for this attribute.
Add some instances of Bar to foo.
Try both foo.bars and foo.bars.all, the first one is scoped, the latter one is not.
I'm on version 2.4.10