couchrest_model/spec/fixtures/more/service.rb
Sam Lown c280b3a29b Renaming to CouchRest Model
Refactored basic directory structure.
Moved to ActiveSupport for Validations and Callbacks.
Cleaned up older code, and removed support for text property types.
2010-06-20 22:01:11 +02:00

11 lines
226 B
Ruby

class Service < CouchRest::Model::Base
# Set the default database to use
use_database DB
# Official Schema
property :name
property :price, Integer
validates_length_of :name, :minimum => 4, :maximum => 20
end