Skip to content

Instantly share code, notes, and snippets.

@sobstel
Created March 11, 2011 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sobstel/866182 to your computer and use it in GitHub Desktop.
Save sobstel/866182 to your computer and use it in GitHub Desktop.
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