Can anyone explain to me the difference between embeds_many and has_many in mongoid?
embeds_many
has_many
embeds_many is used to store relative documents inside of parent document.
has_many is used to store a relation between documents in separate collections. Relative records of has_many have field that stores id of the parent document.
548k questions
547k answers
4 comments
86.3k users