Categories: None [Edit]

styxable

https://rubygems.org/gems/styxable
https://github.com/mediafinger/styxable
Styxable turns deletion into a three-stage lifecycle for ActiveRecord models: active, archived, purged. Calling styx_archive soft-deletes a record — it (optionally) vanishes from default scopes like being in a trash can or recycle bin, but the row survives, so foreign keys, joins, reports and audits keep working. Archived records can still be listed, counted and restored during a configurable grace or retention period, giving you an undo window or restore window instead of an irreversible destroy. While a record sits in the archive it is immutable: writes are rejected, so nothing can be silently edited between archiving and erasure — like in a vault. styx_unarchive brings a record back, unless it cannot, for example when a newer record has claimed a unique attribute in the meantime. Archiving cascades along dependent: associations, so closing an account, deactivating a user or tearing down a tenant can archive everything it owns in a single call, with callbacks around each step. Each model declares its own data retention period. A recurring background job then permanently destroys records whose retention window has expired, expressing your retention schedule, records disposition and automatic purge in code rather than in a runbook — useful for GDPR storage limitation and right to erasure ("right to be forgotten") obligations, or any policy with a TTL or expiry date. A before-purge callback lets you detach ActiveStorage blobs, delete remote files or notify external systems before a record crosses the Styx for good.

Total

Ranking: 184,841 of 197,051
Downloads: 1,726

Daily

Ranking: 67,605 of 197,010
Downloads: 0

Depended by

RankDownloadsName

Depends on

RankDownloadsName
13,792,501,566bundler
81,427,168,861rake
291,024,975,886rspec
55753,518,357rubocop
63708,250,657zeitwerk
182298,640,310rubocop-rspec
217250,012,652irb
356146,895,842bundler-audit
1,09945,163,394rubocop-rake
1,24738,906,792amazing_print

Owners

#GravatarHandle
1iconmediafinger