Sha256: f4ddcc085e3b2a0d340415d984d6412e470957b62fdac38d5e844d8c38c33d5d

Contents?: true

Size: 387 Bytes

Versions: 11

Compression:

Stored size: 387 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

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
couchrest_model-1.1.0.beta5 spec/fixtures/more/cat.rb
couchrest_model-1.1.0.beta4 spec/fixtures/more/cat.rb
couchrest_model-1.1.0.beta3 spec/fixtures/more/cat.rb
couchrest_model-1.1.0.beta2 spec/fixtures/more/cat.rb
couchrest_model-1.1.0.beta spec/fixtures/more/cat.rb
couchrest_model-1.0.0 spec/fixtures/more/cat.rb
couchrest_model-radiant-1.0.0 spec/fixtures/more/cat.rb
couchrest_model-1.0.0.beta8 spec/fixtures/more/cat.rb
couchrest_model_thought-1.0.0.beta9 spec/fixtures/more/cat.rb
couchrest_model_thought-1.0.0.beta8 spec/fixtures/more/cat.rb
couchrest_model-1.0.0.beta7 spec/fixtures/more/cat.rb