PaperTrail Ignore vs Skip
:skip attribute/key was released in PaperTrail 2.4.1 What are the differences between :ignore and :skip?
For example we have Article model with ignored title field and skipped file_upload
field:
1 2 3 4 |
|
Create empty article object, initial version’ll be created:
1 2 3 4 5 |
|
If we update ignored title attribute, version won’t be created. If we update non-ignored content column, version’ll be created and we’ll have stored changes of object in object_changes column that available through changeset attribute.
1 2 3 4 5 6 7 8 9 10 |
|
As we see ignored title column not stored in changeset but it stored in dumped object. But there are some cases when we don’t need to store some columns in dump object by various reasons. For these cases :skip key has been created. :skip and :ignore work identically, but :skip doesn’t store data of skiped columns in object dump. That’s it.
Information about attributes tracking you can find in paper_trail PaperTrail README (Choosing Attributes To Monitor) on GitHub.
Issue about :skip on GitHub.