Skip to content

Instantly share code, notes, and snippets.

@accuser
Created January 12, 2010 11:21
Show Gist options
  • Save accuser/275116 to your computer and use it in GitHub Desktop.
Save accuser/275116 to your computer and use it in GitHub Desktop.
class List
include MongoMapper::Document
key :name, String, :required => true
many :items
end
class Item
include MongoMapper::EmbeddedDocument
key :name, String, :required => true
belongs_to :list
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment