Sha256: e4cad2a11869b2254d7bfedd1aa7b42a45e7c9b546183929864e0b3fb1234050

Contents?: true

Size: 345 Bytes

Versions: 16

Compression:

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

16 entries across 16 versions & 2 rubygems

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