Instantly share code, notes, and snippets.

Embed
What would you like to do?
mongoid: embedded document without object_id
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