Updating documentation

This commit is contained in:
Tapajós 2009-09-03 00:12:16 -03:00
parent 5219f3c0d5
commit 37c6cb30c2

View file

@ -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. 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 ### Casting
Often, you will want to store multiple objects within a document, to be able to retrieve your objects when you load the document, 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 :keywords, :cast_as => ["String"]
property :occurs_at, :cast_as => 'Time' property :occurs_at, :cast_as => 'Time'
property :end_date, :cast_as => 'Date' 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"]