From 13c69d4487ce05f4f52ef2b7aa6b0ab343fdb56b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapaj=C3=B3s?= Date: Thu, 3 Sep 2009 00:00:46 -0300 Subject: [PATCH] Adding more examples of availables options for property. --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 6c68ad9..82eee42 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,13 @@ you can define some casting rules. property :casted_attribute, :cast_as => 'WithCastedModelMixin' 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"]