doc/warning_about_not_setting_whodunnit.md
After upgrading to PaperTrail 5, you see this warning:
user_for_paper_trail is present, but whodunnit has not been set. PaperTrail no longer adds the set_paper_trail_whodunnit before_action for you. Please add this before_action to your ApplicationController to continue recording whodunnit.
Add before_action :set_paper_trail_whodunnit to your ApplicationController.
See the PaperTrail readme for an example (https://github.com/paper-trail-gem/paper_trail#4a-finding-out-who-was-responsible-for-a-change).
If you no longer want to track whodunnit, you may disable this warning by overriding user_for_paper_trail to return nil.
# in application_controller.rb
def user_for_paper_trail
nil # disable whodunnit tracking
end
Upgrade to PT 6.
So that you can control the order of callbacks. Maybe you have another callback
that must happen first, before set_paper_trail_whodunnit.