Adding more examples of availables options for property.

This commit is contained in:
Tapajós 2009-09-03 00:00:46 -03:00
parent bc6df2f5ca
commit 13c69d4487

View file

@ -90,6 +90,13 @@ you can define some casting rules.
property :casted_attribute, :cast_as => 'WithCastedModelMixin' property :casted_attribute, :cast_as => 'WithCastedModelMixin'
property :keywords, :cast_as => ["String"] 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"]