Skip to content

Commit

Permalink
Record 'whodunnit' in paper trail of past versions
Browse files Browse the repository at this point in the history
  The PaperTrail API has changed, so we have to modify the code
  to continue to record 'whodunnit' (who changed the data)
  in past versions recorded by PaperTrail.

Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
  • Loading branch information
david-a-wheeler committed May 3, 2016
1 parent c89b810 commit 2fc3768
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ class ApplicationController < ActionController::Base
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception

# For the PaperTrail gem
before_action :set_paper_trail_whodunnit

# Limit time before must log in again.
before_action :validate_session_timestamp
after_action :persist_session_timestamp
Expand Down
1 change: 1 addition & 0 deletions config/initializers/paper_trail.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PaperTrail.config.track_associations = false

0 comments on commit 2fc3768

Please sign in to comment.