Skip to content

Commit

Permalink
With README
Browse files Browse the repository at this point in the history
  • Loading branch information
marten committed Jun 23, 2008
1 parent 8da1dd0 commit b8a7882
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README
@@ -1,7 +1,7 @@
HasDetails
==========

HasDetails
HasDetails allows you to store a large amount of (optional) attributes for any model's instance in a serialized column. It takes care of adding convenience methods to your model, and verifies that the value being assigned is indeed (one of) the type(s) required for that attribute.

Example
=======
Expand All @@ -10,10 +10,13 @@ class User << ActiveRecord::Base
has_details :firstname => String,
:lastname => String,
:birthday => Date,
:gender => Symbol

:gender => [:male, :female]
end

john = User.find(1)
john.birthday = 5.years.ago
john.gender
=> :male

=======
Copyright (c) 2008 Marten Veldthuis, released under the MIT license

0 comments on commit b8a7882

Please sign in to comment.