Low commit activity in last 3 years
No release in over a year
Browse, view and revert changes to records when using Ruby on Rails and the `paper_trail` gem.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.0
~> 3.0
~> 5.0
~> 13.0
>= 1.3.6

Runtime

>= 6.0, < 8.0
 Project Readme

Gem Version Build Status

PaperTrailViewer

Browse changes to records when using Ruby on Rails and the paper_trail gem.

Screenshot thumbnail showing the webapp

Installation

Add paper_trail_viewer to your bundle and add the following line to your config/routes.rb:

mount PaperTrailViewer::Engine => '/changes'

You can pick any path. Restart the server and go to the chosen path to view your versions.

To limit access, do something like this:

authenticate :user, ->*{ |u| u.superadmin? } do
  mount PaperTrailViewer::Engine => '/changes'
end

Configuration

Put configuration in config/initializers/paper_trail_viewer.rb.

E.g. for linking (or not) to the whodunnit user with a custom path helper:

PaperTrailViewer.user_path_method = :admin_path # default is :user_path
PaperTrailViewer.user_path_method = nil # don't link to the user

Other options are:

  • PaperTrailViewer.allow_rollback (default is true)
  • PaperTrailViewer.data_source (default is ActiveRecord)

Development

Setup

  • Clone the repository
  • Go into the directory
  • Run bin/setup to install Ruby and JS dependencies

Running tests

This repo uses the appraisal gem.

  • Run appraisal generate
  • Run appraisal install
  • Run appraisal rake generate_spec_app
  • Run appraisal rake

License

This program is provided under an MIT open source license, read the LICENSE.txt file for details.

To Note:

This project started as a fork of PaperTrailManager, which was originally developed by Igal Koshevoy, Reid Beels, and Micah Geisel.