-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
ActiveRecord permits defining scope on associations when association is declared. Per https://apidock.com/rails/ActiveRecord/Associations/ClassMethods/has_one:
has_one :vehicle, -> { where(name: 'Car') }
Mongoid does not appear to support scopes in any of its association definitions.
- duplicates
-
MONGOID-5128 Scoped associations - Add :scope parameter to associations
- Closed