Updating documentation
This commit is contained in:
parent
5219f3c0d5
commit
37c6cb30c2
13
README.md
13
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"]
|
||||
|
||||
|
|
Loading…
Reference in a new issue