OSS TanbouSign in with GitHub

Store ActiveRecord model changes as version records for auditing, reification, and history

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
7,030
Primary language
Ruby
License
MIT
Repository last updated
Sep 25, 2026
On this page

Overview

PaperTrail is a versioning and auditing library for Rails and ActiveRecord models. Adding has_paper_trail records create, update, destroy, and related events in a versions table, enabling historical-state reification, change inspection, and actor attribution. The current version is 17.0.0.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Create a version for model events and reify historical state

has_paper_trail records model events and serialized state in version rows. Applications can reify prior states, inspect deleted records, and build audit-history or restore workflows.

Sources: [2]

Capture attribute changes, metadata, and whodunnit context

PaperTrail can store object changes and custom metadata and associate request-level whodunnit with versions. Version classes and version-table names can be customized for application-specific auditing.

Sources: [2][5]

Best fit

Fits Rails applications that need audit logs, change history, and undo-style features

It is useful for administrative and business systems that need to answer who changed what, display configuration history, or reconstruct an earlier model state.

Sources: [2]

Before adoption

Version 17.0.0 requires Ruby 3.2+; plan history growth, sensitive-data exclusions, and serializer compatibility

Version 17.0.0 requires Ruby 3.2 or newer, drops Rails 6.1 and 7.0 support, and adds Rails 8.1 support. Version tables grow with write volume, so retention and indexing matter. Because historical values persist, exclude passwords, tokens, and sensitive data, and review YAML/JSON serializer and schema compatibility during upgrades.

Sources: [4][5][2]

Official sources

  1. [1]paper-trail-gem/paper_trail — GitHub repository(2026-10-06)
  2. [2]PaperTrail — README(2026-10-06)
  3. [3]PaperTrail — version source(2026-10-06)
  4. [4]PaperTrail — paper_trail.gemspec(2026-10-06)
  5. [5]PaperTrail — CHANGELOG(2026-10-06)
  6. [6]PaperTrail — MIT License(2026-10-06)
Supplemental curator note

PaperTrail is straightforward for Rails audit requirements, but version tables grow continuously. Design retention and indexes, exclude sensitive attributes, and verify serializer and schema compatibility as part of operations.

Try it in 3 steps

  1. 1

    Get the source

    git clone --depth 1 https://github.com/paper-trail-gem/paper_trail.git
  2. 2

    Enter the repository

    cd paper_trail
  3. 3

    Check the official steps

    Continue with the commands in the README Installation, Quick Start, or Getting Started section.

    find . -maxdepth 1 -iname 'README*' -exec sed -n '1,220p' {} \; -quit
Check the official README

Growth

Growth trends · Last 30 days

7,030 Stars

Trend data is still being collected.

Development activity

Last 90 days · weekly

Commits (last 30 days)
2
Open PRs
4

Development activity is still being collected.

Built with

Categories and tags

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • ruby
  • activerecord
  • audit
  • log
  • rails
Stars
7,030
Forks
908
Watchers
61
Open issues
5
Contributors
218
Owner type
Organization
Primary language
Ruby
License
MIT
Repository last updated
Sep 25, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?