Skip to content
Browse files

Add note about validations in the README

Change-Id: If1e6ce047cffdc5fe8987f4f9d169800f0b357ec
Reviewed-on: http://review.couchbase.org/21093
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
  • Loading branch information...
1 parent 33feff0 commit 9fc399c66e0346673bce3ee4e6da86fb0da10ada @avsej committed Sep 25, 2012
Showing with 11 additions and 0 deletions.
  1. +11 −0 README.markdown
View
11 README.markdown
@@ -90,6 +90,17 @@ You can define connection options on per model basis:
connect :port => 80, :bucket => 'blog'
end
+## Validations
+
+There are all methods from ActiveModel::Validations accessible in
+context of rails application:
+
+ class Comment < Couchbase::Model
+ attribute :author, :body
+
+ validates_presence_of :author, :body
+ end
+
## Views (aka Map/Reduce indexes)
Views are stored in models directory in subdirectory named after the

0 comments on commit 9fc399c

Please sign in to comment.
Something went wrong with that request. Please try again.