Sha256: c8bbcc754d7810ecaffc853da7180e92ec3e8511409cc1fcddedbed890151e82

Contents?: true

Size: 957 Bytes

Versions: 10

Compression:

Stored size: 957 Bytes

Contents

# The warning about not setting whodunnit

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.

## You want to track whodunnit

Add the set_paper_trail_whodunnit before_action to your ApplicationController.
See the PaperTrail readme for an example (https://git.io/vrsbt).

## You don't want to track whodunnit

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
```

## You just want the warning to go away

To disable this warning for any other reason, use `skip_after_action`.

```
skip_after_action :warn_about_not_setting_whodunnit
```

Version data entries

10 entries across 9 versions & 2 rubygems

Version Path
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/paper_trail-7.0.2/doc/warning_about_not_setting_whodunnit.md
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/paper_trail-5.2.3/doc/warning_about_not_setting_whodunnit.md
paper_trail-7.0.2 doc/warning_about_not_setting_whodunnit.md
paper_trail-7.0.1 doc/warning_about_not_setting_whodunnit.md
paper_trail-7.0.0 doc/warning_about_not_setting_whodunnit.md
paper_trail-6.0.2 doc/warning_about_not_setting_whodunnit.md
paper_trail-6.0.1 doc/warning_about_not_setting_whodunnit.md
paper_trail-6.0.0 doc/warning_about_not_setting_whodunnit.md
paper_trail-5.2.3 doc/warning_about_not_setting_whodunnit.md
paper_trail-5.2.2 doc/warning_about_not_setting_whodunnit.md