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).

Tags

You need to Login to tag this item.