Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

HasDetails is a Rails plugin to allow you to serialize an arbitrary amount of (optional) attributes into a column.

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 tasks
Octocat-spinner-32 test
Octocat-spinner-32 MIT-LICENSE
Octocat-spinner-32 README
Octocat-spinner-32 Rakefile
Octocat-spinner-32 init.rb
Octocat-spinner-32 install.rb
Octocat-spinner-32 uninstall.rb
= 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

  class User << ActiveRecord::Base
    has_details :firstname => String,
                :lastname => String,
                :birthday => Date,
                :gender => [:male, :female]
  john = User.find(1)
  john.birthday = 5.years.ago
  => :male

Copyright (c) 2008 Marten Veldthuis, released under the MIT license
Something went wrong with that request. Please try again.