-
Notifications
You must be signed in to change notification settings - Fork 908
#1459 - create paper_trail.rb initializer that disables versioning on touch events by default. #1520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
#1459 - create paper_trail.rb initializer that disables versioning on touch events by default. #1520
Conversation
…s versioning on touch events by default
revert unintended change made by Appraisal
|
This closes #1459 |
|
This PR has been automatically marked as stale due to inactivity. |
|
Not stale, solution is ready to merge. |
| ## Track versions on create, update, & destroy, but not touch events to reduce version table size. | ||
| ## Add `touch` below to track touch events, or comment out (default behaviour tracks all events). | ||
| PaperTrail.config.has_paper_trail_defaults = { | ||
| on: %i[create update destroy] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i like the generation of this file but i don't think the config generated here should differ from the existing defaults. i realize this goes against part of the intent of your pr but it results in an implicit change to the defaults for anyone starting from scratch which feels inconsistent to me.
|
Ok, updated initializer so that config generated maintains touch events by default. Added a comment to maintain intent the issue instead. |
|
This PR has been automatically marked as stale due to inactivity. |
|
Not stale, just needs review and merge. |
rails generate paper_trail:installcreates apaper_trail.rbinitializer file that disables versioning on touch events by default. The initializer file also has examples for the other significant global config settings mentioned in the readme.install_generator.rbalready contained old comments about creating an initializer file, however the initializer generation was removed when association tracking was split off in 2018 (Commit 1d42d0d).Thank you for your contribution!
Check the following boxes:
master(if not - rebase it).code introduces user-observable changes.
and description in grammatically correct, complete sentences.