Adding uniqueness validation support out of the box

This commit is contained in:
Sam Lown 2010-06-21 21:33:46 +02:00
parent b81d37fc02
commit 08390e6709
5 changed files with 144 additions and 2 deletions

View file

@ -114,4 +114,12 @@ class WithAfterInitializeMethod < CouchRest::Model::Base
end
class WithUniqueValidation < CouchRest::Model::Base
use_database DB
property :title
validates_uniqueness_of :title
end