Created
March 11, 2011 16:54
-
-
Save sobstel/866182 to your computer and use it in GitHub Desktop.
mongoid: embedded document without object_id
This file contains 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 Comment | |
include Mongoid::Document | |
field :name | |
# do not generate object_id | |
# for mongoid <=2.0rc7 (in newer mongoid use Mongoid.embedded_object_id = false) | |
def identify | |
end | |
embedded_in :post | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment