Skip to content

Instantly share code, notes, and snippets.

@tdtds
Created June 9, 2013 23:01
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 tdtds/5745626 to your computer and use it in GitHub Desktop.
Save tdtds/5745626 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'mongoid'
class Agent
include Mongoid::Document
field :guid, type: String
validates :guid, uniqueness: true
has_many :commands
end
class Command
include Mongoid::Document
belongs_to :agent
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment