RubyGems.org

enumify

0.0.7

Enumify lets you add an enum command to ActiveRecord models There are four things that the enumify gems adds to your model Validation - The enumify adds a validation to make sure that the field only receives accepted values Super Cool Methods - adds ? and ! functions for each enum value (canceled? - is it canceled, canceled! - change the state to canceled) Callback support - you can add a x_callback method which will be called each time the status changes Scopes - you can easily query for values of the enum

installgem install enumify
Authors

yon

7,059 total downloads 107 for this version
Owners

A9d448bfe50a5452f6f17362b1febc07

Licenses

MIT

Gemfile
gem 'enumify', '~> 0.0.7'
Versions
  1. 0.0.7 April 9, 2014 (10 KB)
  2. 0.0.6 April 2, 2014 (10 KB)
  3. 0.0.5 October 14, 2013 (9.5 KB)
  4. 0.0.4 August 6, 2013 (9 KB)
  5. 0.0.3 June 3, 2012 (7 KB)
Show all versions (7 total)
Ruby Dependency
  1. >= 0