Sha256: 05f3126e30d90fc6415a3efd3ce64b647e142cae4c547c0423a8e2a180486da8
Contents?: true
Size: 502 Bytes
Versions: 3
Compression:
Stored size: 502 Bytes
Contents
class Address include MongoDoc::Document key :street key :city key :state key :zip_code end class Place include MongoDoc::Document key :name key :type has_one :address end class Contact include MongoDoc::Document key :name key :type key :note key :interests has_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
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
mongo_doc-0.3.1 | features/step_definitions/documents.rb |
mongo_doc-0.3.0 | features/step_definitions/documents.rb |
mongodoc-0.2.4 | features/step_definitions/documents.rb |