Sha256: a0dd27f3bce08c910ec124d2b7a9d0e1a8ac380ab2e84584c400766a5f4c3dae
Contents?: true
Size: 920 Bytes
Versions: 2
Compression:
Stored size: 920 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 references_many :addresses, :as => :previous_addresses timestamps! end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mongo_doc-0.6.11 | features/step_definitions/documents.rb |
mongo_doc-0.6.10 | features/step_definitions/documents.rb |