Embedded Associations

suggest change

Mongoid allows Embedded Associations:

To add an association (lets say the User embeds_many addresses), add this to your User file:

embeds_many :addresses

and this to your Address model file:

embedded_in :user

This will embed Address in your User model, adding a addresses method to your User class.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Mongoid:
*Embedded Associations

Table Of Contents
25Mongoid
55CSV