Features:
- Added "enum_value" (returns value) instance method in addition to "enum_name" (returns stringified enum key)
- Added class methods "enum_value" (returns value by key) and "enum_by_value" (returns key by value)
- Performance improvement: use
class_eval
with string instead of blocks
Bugfixes:
- Fixed const naming: use
SIMPLE_STATUSES
andSIMPLE_STATUSES_INVERTED
instead ofSimpleStatuses
andSimpleStatusesInverted
- Fixed Ruby warning about redefining a constant occurred when two or more magic enums share single enum value hash
Bugfixes:
- Allow
nil
values - Updated specs to RSpec 1.2 syntax
Features:
- Rails 4.0.0 support
Features:
- Files re-organization
Features:
- Rails < 3.3 support
Features:
- First gem version
Features:
- Setter method symbolizes strings
Bugfixes:
- Added tests for named scopes
Features:
- Added a special named scope "of_name", which accepts symbol
- Added scope extensions
Features:
- Setter method accepts integer values in addition to symbols
Features:
- Added support of named scopes
Features:
- Added support of named scopes
Features:
- Basic ENUM functionality