# aasm/aasm

AASM - State machines for Ruby classes (plain Ruby, ActiveRecord, Mongoid, NoBrainer, Dynamoid)

Repository: https://github.com/aasm/aasm
Canonical: https://ross.abutalabs.com/products/aasm
Language: Ruby
License: MIT
License Family: permissive
Topics: state-machine, ruby, aasm, transition, activerecord, mongoid, hacktoberfest, rails
Last push: 2026-07-05T05:51:32+00:00

## Health v2 (maintenance only)
Score: 73/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 91, release rhythm 35, longevity 100
- inputs: {"age_days": 6761, "days_push": 59, "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 5230, forks 643 (observed 2026-08-28T04:09:13.448618+00:00)

## What it is
AASM is a Ruby library for adding finite state machines to Ruby classes, with adapters for ActiveRecord, Mongoid, NoBrainer, Dynamoid, Sequel, and Redis. It supports callbacks, guards, transitions, multiple state machines per class, transaction support, and testing helpers.

## Use cases
- add a state machine to a Rails ActiveRecord model
- manage order lifecycle states with guarded transitions
- define state machines for plain Ruby classes
- persist state transitions with Mongoid or Dynamoid
- test state machine transitions with RSpec or Minitest
- log and inspect state changes on models

## When to choose
- you need finite state machine semantics in Ruby with ORM persistence
- you want callbacks, guards, and transaction support around transitions
- you need multiple named state machines on a single class

## When to avoid
- you need state machines in a non-Ruby language
- you only need a simple status enum without transition logic
- you need distributed workflow orchestration rather than in-model state

## Facets
- artifact type: library
- maturity: stable
- function: state-management, orm, developer-tools
- domain: web-development, backend, developer-tools
- platform: ruby, jvm
- tags: state-machine, finite-state-machine, activerecord, mongoid, rails, transitions, callbacks, guards

## Member repositories
- aasm/aasm (main) score 73

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:13.448618+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-29T17:59:39.398538+00:00, confidence not recorded.
  - readme: https://github.com/aasm/aasm (fetched 2026-08-28T04:09:13.448618+00:00, sha e6612b9d0fcd)
- Data as of 2026-08-30T08:39:29.467469+00:00.
