Updating README

This commit is contained in:
Tapajós 2009-11-01 10:47:48 -02:00
parent ca2faa81fe
commit 40bef6cafb

View file

@ -142,6 +142,18 @@ Check the mixin or the ExtendedDocument class to see how to implement your own c
property :name, :length => 4...20
property :price, :type => Integer
Attribute protection from mass assignment to CouchRest properties. There are two modes of protection:
1) Declare accessible poperties, assume all the rest are protected
property :name, :accessible => true
property :admin # this will be automatically protected
2) Declare protected properties, assume all the rest are accessible
property :name # this will not be protected
property :admin, :protected => true
Note: you cannot set both flags in a single class
### Casting
Often, you will want to store multiple objects within a document, to be able to retrieve your objects when you load the document,