# cgriego/active_attr

What ActiveModel left out

Repository: https://github.com/cgriego/active_attr
Canonical: https://ross.abutalabs.com/products/active_attr
Language: Ruby
License: MIT
License Family: permissive
Topics: activemodel, rails, models
Last push: 2026-03-01T18:52:16+00:00

## Health v2 (maintenance only)
Score: 64/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 70, release rhythm 35, longevity 100
- inputs: {"age_days": 5452, "days_push": 185, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1195, forks 91 (observed 2026-08-28T04:03:56.866624+00:00)

## What it is
ActiveAttr is a Ruby gem providing composable modules that let you build plain Ruby objects with ActiveModel-compatible features like attribute definitions, defaults, typecasting, and querying. It fills the gaps in ActiveModel so POROs can behave like ORM-backed models without a database.

## Use cases
- create plain ruby models with activemodel compatibility
- define typed attributes with defaults on non-database models
- build form objects that behave like active record models
- add attribute typecasting to plain old ruby objects
- make service objects satisfy the activemodel api
- extract model logic out of active record into lightweight classes

## When to choose
- you need ActiveModel API compliance without ActiveRecord or a database
- you want composable attribute functionality instead of a full ORM
- you're building form objects, service objects, or domain models in a Rails app

## When to avoid
- you're already using ActiveRecord or another full ORM with persistence
- you need a lightweight modern alternative like Virtus or dry-types with different APIs
- your project doesn't use Ruby

## Facets
- artifact type: library
- maturity: active
- function: orm, serialization, form-handling
- domain: web-development, backend, developer-tools
- platform: ruby, jvm
- tags: activemodel, plain-ruby-models, attributes, typecasting, rails

## Member repositories
- cgriego/active_attr (main) score 64

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:56.866624+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-30T06:22:05.373930+00:00, confidence not recorded.
  - readme: https://github.com/cgriego/active_attr (fetched 2026-08-28T04:03:56.866624+00:00, sha cf4c60032567)
- Data as of 2026-08-30T08:39:29.467469+00:00.
