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]
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.
Official sources
- [1]paper-trail-gem/paper_trail — GitHub repository(2026-10-06)
- [2]PaperTrail — README(2026-10-06)
- [3]PaperTrail — version source(2026-10-06)
- [4]PaperTrail — paper_trail.gemspec(2026-10-06)
- [5]PaperTrail — CHANGELOG(2026-10-06)
- [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
Get the source
git clone --depth 1 https://github.com/paper-trail-gem/paper_trail.git - 2
Enter the repository
cd paper_trail - 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
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
Categories
GitHub data
GitHub dataView detailed GitHub data
GitHub Topics
- ruby
- activerecord
- audit
- log
- rails
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- activerecord-import4,155 Stars
2 shared tag(s) · 2 shared category(s) · Same language
Bulk-insert ActiveRecord data with fewer SQL statements while controlling batches, validation, and upserts
Ruby - mysql22,273 Stars
2 shared tag(s) · 2 shared category(s) · Same language
connect Ruby to MySQL or MariaDB and handle SQL queries, prepared statements, and streaming results
Ruby - pg_search1,588 Stars
2 shared tag(s) · 2 shared category(s) · Same language
Expose PostgreSQL full-text search, trigrams, ranking, and multi-model search as ActiveRecord scopes
Ruby - pg869 Stars
2 shared tag(s) · 1 shared category(s)
connect Ruby applications to PostgreSQL with queries, COPY, type casting, and asynchronous libpq I/O
C - Entity Framework Core14,797 Stars
1 shared tag(s) · 3 shared category(s)
map .NET objects to databases with LINQ queries, change tracking, updates, schema migrations, and provider plugins
C# - GRDB8,676 Stars
1 shared tag(s) · 3 shared category(s)
use SQLite through Swift records, query interfaces, observation, and migrations
Swift
Report incorrect information
Tell us if any listing information is incorrect or outdated.