Skip to content

Commit

Permalink
Clarify install generator option for adding :object_changes column mi…
Browse files Browse the repository at this point in the history
…gration to install in README; re #312 [ci skip]
  • Loading branch information
batter committed Mar 5, 2014
1 parent 59743fa commit d139722
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -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'
Expand Down

0 comments on commit d139722

Please sign in to comment.