jhawthorn/discard
🃏🗑 Soft deletes for ActiveRecord done right observed · 2026-10-18
Health v2 · maintenance only
77/100
- Activity 100
- Release rhythm 35
- Longevity 100
Flags: no_releases
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-10-21. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 3472
- days_rel: n/a
- days_push: 5
- n_releases_24m: 0
Adoption not part of the score
2426 stars · 95 forks observed · 2026-10-18
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
Discard is a simple Ruby ActiveRecord mixin that adds soft-delete conventions by flagging records with a discarded_at timestamp instead of destroying them. It provides kept/discarded scopes and discard/undiscard methods as a lightweight alternative to gems like paranoia.
Use cases
- soft delete records in a Rails app
- restore deleted records with undiscard
- replace acts_as_paranoid with a simpler soft-delete mixin
- keep deleted posts out of default queries but still queryable
- implement trash/undo functionality in ActiveRecord models
When to choose
- you use ActiveRecord and want simple, minimal soft deletes
- you want discarded records to remain queryable without cascading deletes to associations
- you find paranoia too invasive or awkward for restoring records
When to avoid
- you need hard deletes with true row removal
- you're not using Rails/ActiveRecord
- you need versioned audit trails or full history tracking rather than a single discarded_at flag
Facets
library · maturity stable
orm database developer-tools web-development databases backend ruby jvm soft-deletes activerecord rails ruby-gem
1 source
- readme: https://github.com/jhawthorn/discard · fetched 2026-10-18 · f9d41c8bcb48
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| jhawthorn/discard | main | 77 |
For agents
markdown · JSON · MCP: product_card(name="jhawthorn/discard")
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem