From d152b5eddc3392e8c63a17efc65697592e61901c Mon Sep 17 00:00:00 2001 From: Nishanth Vijayan Date: Wed, 18 May 2016 20:17:35 +0530 Subject: [PATCH] Update paper_trail gem to latest --- Gemfile.lock | 11 ++++++----- app/controllers/application_controller.rb | 1 + config/initializers/paper_trail.rb | 2 ++ 3 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 config/initializers/paper_trail.rb diff --git a/Gemfile.lock b/Gemfile.lock index 7bdf62ea..89c4c9e6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -254,7 +254,7 @@ GEM rake mini_magick (4.5.1) mini_portile2 (2.0.0) - minitest (5.8.4) + minitest (5.9.0) momentjs-rails (2.8.1) railties (>= 3.1) monetize (1.4.0) @@ -302,9 +302,10 @@ GEM rack-openid (~> 1.3.1) open4 (1.3.4) orm_adapter (0.5.0) - paper_trail (3.0.1) - activerecord (>= 3.0, < 5.0) - activesupport (>= 3.0, < 5.0) + paper_trail (5.0.1) + activerecord (>= 3.0, < 6.0) + activesupport (>= 3.0, < 6.0) + request_store (~> 1.1) parser (2.3.0.3) ast (~> 2.2) pdf-core (0.2.5) @@ -402,7 +403,7 @@ GEM yajl-ruby (~> 1.1) redcarpet (3.2.3) referer-parser (0.2.1) - request_store (1.0.6) + request_store (1.1.0) responders (2.1.1) railties (>= 4.2.0, < 5.1) rest-client (1.8.0) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 51dc6772..8fdc2a0d 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,4 +1,5 @@ class ApplicationController < ActionController::Base + before_filter :set_paper_trail_whodunnit include ApplicationHelper add_flash_types :error protect_from_forgery with: :exception diff --git a/config/initializers/paper_trail.rb b/config/initializers/paper_trail.rb new file mode 100644 index 00000000..77a8364d --- /dev/null +++ b/config/initializers/paper_trail.rb @@ -0,0 +1,2 @@ +# Tracking associations is an experimental feature and it is recommended to set it to false +PaperTrail.config.track_associations = false