# drapergem/draper

Decorators/View-Models for Rails Applications

Repository: https://github.com/drapergem/draper
Canonical: https://ross.abutalabs.com/products/draper
Language: Ruby
License: MIT
License Family: permissive
Topics: decorators, ruby
Last push: 2026-05-29T22:35:41+00:00

## Health v2 (maintenance only)
Score: 78/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 84, release rhythm 57, longevity 100
- inputs: {"age_days": 5543, "days_push": 96, "days_rel": 288, "gap_med": 0, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5276, forks 523 (observed 2026-08-28T04:09:14.103868+00:00)

## What it is
Draper is a Ruby gem that adds a decorator/view-model layer to Rails applications. It wraps ActiveRecord models with presentation-specific logic, keeping views clean and models free of display concerns.

## Use cases
- move view helper logic into testable objects
- format dates and statuses for display in Rails views
- keep presentation logic out of ActiveRecord models
- organize view-model code for complex Rails UIs
- replace global helper methods with object-oriented decorators

## When to choose
- you have a Rails app with presentation logic cluttering models or helpers
- you want testable, object-oriented view logic
- you need per-model display formatting without helper namespace pollution

## When to avoid
- you use Sinatra, Hanami, or a non-Rails Ruby framework
- your views are simple and helpers suffice
- you prefer a different view-model pattern like plain POROs or ViewComponents

## Facets
- artifact type: library
- maturity: stable
- function: templating, middleware
- domain: web-development, backend, developer-tools
- platform: ruby
- tags: decorators, view-models, rails, presentation-layer, mvc, web-server

## Member repositories
- drapergem/draper (main) score 78

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:14.103868+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:18.805758+00:00, confidence not recorded.
  - readme: https://github.com/drapergem/draper (fetched 2026-08-28T04:09:14.103868+00:00, sha 1e1117abda43)
- Data as of 2026-08-30T08:39:29.467469+00:00.
