# brendon/ranked-model

An acts_as_sortable/acts_as_list replacement built for Rails 4+

Repository: https://github.com/brendon/ranked-model
Canonical: https://ross.abutalabs.com/products/ranked-model
Homepage: https://github.com/mixonic/ranked-model
Language: Ruby
License: MIT
License Family: permissive
Last push: 2026-06-22T22:03:55+00:00

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

## Adoption (not part of the score)
Stars 1093, forks 135 (observed 2026-08-28T04:03:33.718838+00:00)

## What it is
ranked-model is a Ruby gem for Rails that manages row ordering/sorting in ActiveRecord models, serving as a modern replacement for acts_as_list and acts_as_sortable. It uses relative integer ranking with ARel for efficient positioning of records within scoped lists.

## Use cases
- sort rails records with drag and drop ordering
- maintain ordered lists in activerecord models
- replace acts_as_list with better performance
- reorder rows in a scoped list without rewriting all positions
- implement sortable todo or playlist items in rails

## When to choose
- you need efficient reordering of large lists without updating every row
- you want relative positioning with scoped ordering in Rails 4.2+

## When to avoid
- you are starting a new project - the maintainer recommends the newer Positioning gem
- you are not using Rails or ActiveRecord

## Facets
- artifact type: library
- maturity: maintenance
- function: orm, database
- domain: web-development, backend, databases
- platform: ruby
- tags: rails, gem, sorting, row-ordering, activerecord, drag-and-drop-ordering, web-server

## Member repositories
- brendon/ranked-model (main) score 72

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:33.718838+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:47:41.269169+00:00, confidence not recorded.
  - homepage: https://github.com/mixonic/ranked-model (fetched 2026-08-29T12:50:37.668082+00:00, sha abb52a30e03d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
