# brainspec/enumerize

Enumerated attributes with I18n and ActiveRecord/Mongoid support

Repository: https://github.com/brainspec/enumerize
Canonical: https://ross.abutalabs.com/products/enumerize
Language: Ruby
License: MIT
License Family: permissive
Topics: ruby, activerecord, mongoid
Last push: 2026-08-04T12:22:05+00:00

## Health v2 (maintenance only)
Score: 66/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 96, release rhythm 8, longevity 100
- inputs: {"age_days": 5334, "days_push": 29, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1762, forks 202 (observed 2026-08-28T04:05:32.736748+00:00)

## What it is
A Ruby gem that adds enumerated attributes to Ruby classes with support for I18n translations and ORMs like ActiveRecord, Mongoid, MongoMapper, and Sequel. It provides validations, scopes, form integration (SimpleForm, Formtastic), and testing helpers for enum-like fields.

## Use cases
- add enum attributes to Rails ActiveRecord models
- define enumerated fields with Mongoid documents
- translate enum values with I18n in a Rails app
- add inclusion validation and default values to status fields
- query models with ActiveRecord scopes on enum attributes
- render enum select inputs in SimpleForm or Formtastic
- test enumerized attributes with RSpec or Shoulda

## When to choose
- you're on Ruby 3.1+ / Rails 7.0+ and need rich enum attributes with I18n labels
- you use ActiveRecord, Mongoid, MongoMapper, or Sequel and want consistent enum behavior across ORMs
- you need enum scopes, form integration, and testing helpers beyond Ruby's built-in enum

## When to avoid
- you only need simple integer-backed enums and ActiveRecord's built-in enum suffices
- you're on an older Ruby or Rails version unsupported by the gem
- you need enums in a non-Ruby stack

## Facets
- artifact type: library
- maturity: active
- function: orm, internationalization, form-handling, testing
- domain: web-development, backend, developer-tools
- platform: ruby
- tags: enumerated-attributes, activerecord, mongoid, sequel, rails, i18n, enums, localization

## Member repositories
- brainspec/enumerize (main) score 66

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:32.736748+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:27:01.417708+00:00, confidence not recorded.
  - readme: https://github.com/brainspec/enumerize (fetched 2026-08-28T04:05:32.736748+00:00, sha 64ca6a20ee9f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
