Skip to content

Instantly share code, notes, and snippets.

@collectiveidea
Created October 21, 2009 21:28
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 collectiveidea/215472 to your computer and use it in GitHub Desktop.
Save collectiveidea/215472 to your computer and use it in GitHub Desktop.
class List
include MongoMapper::Document
key :name, String, :required => true
many :users, :foreign_key => 'list_ids'
end
class User
include MongoMapper::Document
key :list_ids, Array
many :lists
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment