RubyGems Navigation menu

values_for 0.1

values_for makes your ActiveRecord-backed class work with an enumerable type. Instead of existing ActiveRecord plugins such as enum_fu, which store the enumerable attribute as an integer, values_for stores the content of the enumerable attribute in a varchar column of the database. The field will automatically validate using validates_inclusion_of and accepts all the same options. values_for will also optionally create named scopes, predicate methods, and constants defining the possible values for enumerable types on your model. By default, however, it avoids polluting your model with things you may not need unless these features are specifically requested.

Versions:

  1. 0.1 - June 17, 2009 (9.5 KB)
  2. 0.0.9 - June 17, 2009 (9.5 KB)

Authors:

  • Justin Leitgeb

Owners:

C3dce717fc1f2915c5cd966680b7f1f7

Sha 256 checksum:

a8f7a2fcc7910e2de78dc9fb62ec26fce16c2f813d48a28d6585a0b297ac692a

Total downloads 7,593

For this version 6,256

Required Ruby Version: None

Licenses:

N/A

Gemfile:
= Copy to clipboard Copied!

install:
= Copy to clipboard Copied!

Links: