Sha256: f9b76cf27756b10181bb63d828bedb0dff9b2790b226c14bdcb9130bdcb674cb
Contents?: true
Size: 530 Bytes
Versions: 3
Compression:
Stored size: 530 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 named_scope :rubyists, :in => {:interests => ['ruby']} named_scope :contract_work, :in => {:interests => ['contract work']} named_scope :in_state, lambda {|state| { :where => {'addresses.state' => state}}} end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
mongodoc-0.2.2 | features/step_definitions/documents.rb |
mongodoc-0.2.1 | features/step_definitions/documents.rb |
mongodoc-0.2.0 | features/step_definitions/documents.rb |