- These notes are meant to follow reading the README. Please start there.
- Primary interface is the
has_paper_trail
class method added toActiveRecord::Base
. - Calling this method adds some associations and callbacks to the model.
- These associations are to
PaperTrail::Version
models or its ancestors all which inheritActiveRecord::Base
. ThisActiveModel::Concern
module provides all the features. - Versions can be in many tables and a model may have many version types 1, 2, 3
- Versions can store custom meta data but any data will require columns on the version table 1, 2
- Versions help to track who was responsible for a change via the
whodunnit
attribute 1, 2 - One can add whodunnit info with a custom controller helper but any info will require columns on the version table.
- Diffing requires storing changesets which requires the
object_changes
column in your versions table.
Last active
August 29, 2015 14:15
-
-
Save bramswenson/2b1c6953cb18c726a571 to your computer and use it in GitHub Desktop.
paper_trail exploration
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment