Sha256: a77917c95fcff2ada2def2b9a999298aee42aa421433933d3649ed37db4fcde6

Contents?: true

Size: 454 Bytes

Versions: 16

Compression:

Stored size: 454 Bytes

Contents

class CatToy
  include CouchRest::Model::Embeddable

  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

16 entries across 16 versions & 2 rubygems

Version Path
couchrest_model-2.2.0.beta2 spec/fixtures/models/cat.rb
couchrest_model-2.2.0.beta1 spec/fixtures/models/cat.rb
couchrest_model-2.1.0.rc1 spec/fixtures/models/cat.rb
couchrest_model-2.1.0.beta2 spec/fixtures/models/cat.rb
couchrest_model-2.1.0.beta1 spec/fixtures/models/cat.rb
couchrest_model-2.0.4 spec/fixtures/models/cat.rb
couchrest_model-2.0.3 spec/fixtures/models/cat.rb
couchrest_model-2.0.1 spec/fixtures/models/cat.rb
couchrest_model-2.0.0 spec/fixtures/models/cat.rb
couchrest_model-2.0.0.beta2 spec/fixtures/models/cat.rb
couchrest_model-2.0.0.beta spec/fixtures/models/cat.rb
couchrest_model-1.2.0.beta spec/fixtures/models/cat.rb
openlogic-couchrest_model-1.0.0 spec/fixtures/models/cat.rb
couchrest_model-1.1.2 spec/fixtures/models/cat.rb
couchrest_model-1.1.1 spec/fixtures/models/cat.rb
couchrest_model-1.1.0 spec/fixtures/models/cat.rb