-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: Associations
-
None
How about support scope with mongoid like what ActiveRecord does
In some case
class Post include Mongoid::Document field :is_private, Boolean belongs_to :user end class User has_many :posts has_many :private_posts, -> { where(is_private: true) } end
if there is no scope support in association, what's the mongoid's way to support the scene?
- duplicates
-
MONGOID-5128 Scoped associations - Add :scope parameter to associations
- Closed