Adding a bit of clarification to the README portion explaining the :only and :ignore options for the has_paper_trail method.

This commit is contained in:
Ben Atkins 2012-10-12 19:32:27 -04:00
parent c1f6139ab8
commit b7c7e1c021
1 changed files with 2 additions and 1 deletions

View File

@ -223,7 +223,7 @@ This means that changes to just the `title` or `rating` will not store another v
>> a.versions.length # 1
>> a.update_attributes :title => 'My Title', :rating => 3
>> a.versions.length # 1
>> a.update_attributes :content => 'Hello'
>> a.update_attributes :title => 'Greeting', :content => 'Hello'
>> a.versions.length # 2
>> a.previous_version.title # 'My Title'
```
@ -245,6 +245,7 @@ This means that only changes to the `title` will save a version of the article:
>> a.versions.length # 2
>> a.update_attributes :content => 'Hello'
>> a.versions.length # 2
>> a.previous_version.content # nil
```
Passing both `:ignore` and `:only` options will result in the article being saved if a changed attribute is included in `:only` but not in `:ignore`.