Sha256: 302d0ecea9fdd903d65a4a082b639480f37cce0f6488fea4e8a3648195ca89e6

Contents?: true

Size: 349 Bytes

Versions: 12

Compression:

Stored size: 349 Bytes

Contents

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

  # Official Schema
  property :client_name
  property :employee_name
  property :location
  
  # Validation
  validates_presence_of :client_name, :employee_name
  validates_presence_of :location, :message => "Hey stupid!, you forgot the location"
  
end

Version data entries

12 entries across 12 versions & 3 rubygems

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