Clarify exclusion of ignored attributes in changeset.
This commit is contained in:
parent
6367d34369
commit
25fbd8a29d
|
@ -455,7 +455,7 @@ Remember to add those extra columns to your `versions` table ;)
|
|||
|
||||
There are two scenarios: diffing adjacent versions and diffing non-adjacent versions.
|
||||
|
||||
The best way to diff adjacent versions is to get PaperTrail to do it for you. If you add an `object_changes` text column to your `versions` table, either at installation time with the `--with-changes` option or manually, PaperTrail will store the `changes` diff in each `update` version. You can use the `version.changeset` method to retrieve it. For example:
|
||||
The best way to diff adjacent versions is to get PaperTrail to do it for you. If you add an `object_changes` text column to your `versions` table, either at installation time with the `--with-changes` option or manually, PaperTrail will store the `changes` diff (excluding any attributes PaperTrail is ignoring) in each `update` version. You can use the `version.changeset` method to retrieve it. For example:
|
||||
|
||||
>> widget = Widget.create :name => 'Bob'
|
||||
>> widget.versions.last.changeset # nil
|
||||
|
|
Loading…
Reference in New Issue