couchrest_model/spec/fixtures/more/service.rb

14 lines
356 B
Ruby

class Service < CouchRest::ExtendedDocument
# Include the validation module to get access to the validation methods
include CouchRest::Validation
# Set the default database to use
use_database TEST_SERVER.default_database
# Official Schema
property :name, :length => 4...20
property :price, :type => Integer
auto_validate!
end