Updating README
This commit is contained in:
parent
ca2faa81fe
commit
40bef6cafb
1 changed files with 12 additions and 0 deletions
12
README.md
12
README.md
|
@ -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 :name, :length => 4...20
|
||||||
property :price, :type => Integer
|
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
|
### 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,
|
||||||
|
|
Loading…
Reference in a new issue