ActiveRecord::Enum

Declare an enum attribute where the values map to integers in the database, but can be queried by name.