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