simple_enum

Simple enum-like field support for Ruby, ActiveRecord and Mongoid, including validation and internationalization.

Rubygem API Docs View on GitHub

Getting started

Starting with simple_enum is as easy as adding this line to your application's Gemfile:

gem 'simple_enum'

And then execute bundle or install it yourself: gem install simple_enum.

Rails integration

→ Using simple_enum with ActiveRecord
→ Defining custom column names

Mongoid usage

→ Using simple_enum with Mongoid

Configuration and more

→ Options for as_enum
→ Enum values