Sha256: f43b43ddff83d81fa60cd7b446720ee98d45e4d2dc4602c5b669f2b24c17e184

Contents?: true

Size: 464 Bytes

Versions: 1

Compression:

Stored size: 464 Bytes

Contents

class CatToy < Hash
  include ::CouchRest::Model::CastedModel

  property :name

  validates_presence_of :name
end

class Cat < CouchRest::Model::Base
  # Set the default database to use
  use_database DB

  property :name, :accessible => true
  property :toys, [CatToy], :default => [], :accessible => true
  property :favorite_toy, CatToy, :accessible => true
  property :number
end

class ChildCat < Cat
  property :mother, Cat
  property :siblings, [Cat]
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
couchrest_model-1.1.0.rc1 spec/fixtures/more/cat.rb