couchrest_model/spec/fixtures/models/invoice.rb
2011-06-09 01:05:22 +02:00

14 lines
345 B
Ruby

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