Created
June 22, 2010 21:32
-
-
Save bkudria/449128 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BusinessUnit | |
include Mongoid::Document | |
field :name, :type => String | |
embeds_many :users | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User | |
include Mongoid::Document | |
field :name, :type => String | |
embedded_in :business_unit, :inverse_of => :users | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment