- mongoid - using includes to select children objects in a 1..N referenced relationship
- blog.posts
- tag.posts
- Post.includes(:tag).where(:blog_id: blog.id)
- blog.posts
- has_many :posts do
- def with_tags
- includes(:tag)
- end
- end
- blog.posts.with_tags
- blog.posts
- class Post
- belongs_to :tag
- default_scope includes(:tag)
- end