Hi, I'm a little stuck with the concept of EmbeddedDocuments in MongoMapper. My Models look like this:
class Post
include MongoMapper::Document
many :categories
many :qualities
end
class Category
include MongoMapper::EmbeddedDocument
belongs_to :post
many :qualities
end
class Quality
include MongoMapper::EmbeddedDocument
key :category_id, ObjectId
belongs_to :post
belongs_to :category
end
My question is kind of simple: I am showing a post and want to list it's categories and all qualities belonging to it (category_id).