From 37c6cb30c20c902a476600eebaef7875baa64e2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapaj=C3=B3s?= Date: Thu, 3 Sep 2009 00:12:16 -0300 Subject: [PATCH] Updating documentation --- README.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 82eee42..9afd7f3 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,13 @@ CouchRest uses a mixin you can find in lib/mixins/callbacks which is extracted f Check the mixin or the ExtendedDocument class to see how to implement your own callbacks. +### Properties + + property :last_name, :alias => :family_name + property :read_only_value, :read_only => true + property :name, :length => 4...20 + property :price, :type => Integer + ### Casting Often, you will want to store multiple objects within a document, to be able to retrieve your objects when you load the document, @@ -92,11 +99,5 @@ you can define some casting rules. property :keywords, :cast_as => ["String"] property :occurs_at, :cast_as => 'Time' property :end_date, :cast_as => 'Date' - property :last_name, :alias => :family_name - property :read_only_value, :read_only => true - property :name, :length => 4...20 - property :price, :type => Integer - - -If you want to cast an array of instances from a specific Class, use the trick shown above ["ClassName"] +If you want to cast an array of instances from a specific Class, use the trick shown above ["ClassName"] \ No newline at end of file