Sha256: 2c666a26b307316aa9c2e2b6b07ff7580a4fe1081adb148540706c8f455854cb

Contents?: true

Size: 458 Bytes

Versions: 31

Compression:

Stored size: 458 Bytes

Contents

class Invoice < CouchRest::ExtendedDocument  
  # Include the validation module to get access to the validation methods
  include CouchRest::Validation
  
  # Set the default database to use
  use_database DB
  
  # Official Schema
  property :client_name
  property :employee_name
  property :location
  
  # Validation
  validates_present :client_name, :employee_name
  validates_present :location, :message => "Hey stupid!, you forgot the location"
  
end

Version data entries

31 entries across 31 versions & 7 rubygems

Version Path
mattetti-couchrest-0.28 spec/fixtures/more/invoice.rb
mattetti-couchrest-0.29 spec/fixtures/more/invoice.rb
mattetti-couchrest-0.30 spec/fixtures/more/invoice.rb
mattetti-couchrest-0.31 spec/fixtures/more/invoice.rb
mattetti-couchrest-0.32 spec/fixtures/more/invoice.rb
mattetti-couchrest-0.33 spec/fixtures/more/invoice.rb
mattetti-couchrest-0.34 spec/fixtures/more/invoice.rb
norr-couchrest-0.30.1 spec/fixtures/more/invoice.rb
norr-couchrest-0.30.2 spec/fixtures/more/invoice.rb
norr-couchrest-0.30.3 spec/fixtures/more/invoice.rb
norr-couchrest-0.30.4 spec/fixtures/more/invoice.rb
norr-couchrest-0.30 spec/fixtures/more/invoice.rb
norr-couchrest-0.33.01 spec/fixtures/more/invoice.rb
norr-couchrest-0.33.02 spec/fixtures/more/invoice.rb
norr-couchrest-0.33.06 spec/fixtures/more/invoice.rb
norr-couchrest-0.33.07 spec/fixtures/more/invoice.rb
oz-couchrest-0.29 spec/fixtures/more/invoice.rb
peterpunk-couchrest-0.33 spec/fixtures/more/invoice.rb
peterpunk-couchrest-0.34.1 spec/fixtures/more/invoice.rb
sporkd-couchrest-0.30 spec/fixtures/more/invoice.rb