mirror of
https://github.com/paper-trail-gem/paper_trail.git
synced 2022-11-09 11:33:19 -05:00
Clarify install generator option for adding :object_changes column migration to install in README; re #312 [ci skip]
This commit is contained in:
parent
59743fa25b
commit
d139722f0d
1 changed files with 1 additions and 1 deletions
|
@ -736,7 +736,7 @@ Remember to add those extra columns to your `versions` table and use `attr_acces
|
|||
|
||||
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 (excluding any attributes PaperTrail is ignoring) 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 `rails generate paper_trail:install --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:
|
||||
|
||||
```ruby
|
||||
>> widget = Widget.create :name => 'Bob'
|
||||
|
|
Loading…
Reference in a new issue