Agile Web Development

Build it. Launch it. Love it.

Acts As Enumerated

Values for acts_as_enumerated models are cached (reducing hits to the database) and you can define �virtual� acts_as_enumeration classes, eliminating the need to clutter your models directory with classes that do nothing more than acts_as_enumerated.

The has_enumerated macro allows your models to refer to acts_as_enumerated instances without resorting to using belongs_to (which can require you to jump through hoops to avoid the database hit when retrieving the enumeration value).

Vitals

Home http://wiki.rubyonrails.org/rails/pages/Acts+As+Enumerated+Plugin
Repository http://svn.protocool.com/public/plugins/enumerations_mixin/
License
Tags Tag_red base enumeration
Rating (40 votes)
Owner Trevor Squires
Created 14 April 2006

Comments

  • 11 August 2006

    Nice plugin ..

Add a comment