Sha256: 7fd304d78d634d3b2e21662ebca7662c86472937b0e51d2500b1f78e54880b9f
Contents?: true
Size: 863 Bytes
Versions: 4
Compression:
Stored size: 863 Bytes
Contents
class Address include MongoDoc::Document attr_accessor :street attr_accessor :city attr_accessor :state attr_accessor :zip_code end class Place include MongoDoc::Document attr_accessor :name attr_accessor :type embed :address end class Contact include MongoDoc::Document attr_accessor :name attr_accessor :type attr_accessor :note attr_accessor :interests embed_many :addresses scope :rubyists, any_in(:interests => ['ruby']) scope :contract_work, any_in(:interests => ['contract work']) scope :in_state, lambda {|state| where('addresses.state' => state)} end class Event include MongoDoc::Document attr_accessor :name attr_accessor :venue attr_accessor :date, :type => Date embed_hash :addresses end class Person include MongoDoc::Document attr_accessor :name references :address timestamps! end
Version data entries
4 entries across 4 versions & 1 rubygems