2010-06-20 22:01:11 +02:00
|
|
|
class Service < CouchRest::Model::Base
|
2009-02-05 17:06:12 -08:00
|
|
|
# Set the default database to use
|
2009-05-27 18:16:50 -07:00
|
|
|
use_database DB
|
2009-02-05 17:06:12 -08:00
|
|
|
|
|
|
|
# Official Schema
|
2010-06-20 22:01:11 +02:00
|
|
|
property :name
|
|
|
|
property :price, Integer
|
2009-02-05 17:06:12 -08:00
|
|
|
|
2010-06-20 22:01:11 +02:00
|
|
|
validates_length_of :name, :minimum => 4, :maximum => 20
|
|
|
|
end
|