Plugins - HasDetails

StarAdd to favorites

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]
end

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

Marten Veldthuis

http://github.com/marten/has_details/tree/master

git://github.com/marten/has_details.git

Rails' (MIT)

  • Currently 0.0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Model

Tags

Comments

Add a comment

Search Plugins

Query syntax

Plugins by Category

Sponsors

Rails Kits: Get Code. Get Moving.

Have a comment?