Update README.md [ci skip]

Clarify that versions call is on an instance not the class
This commit is contained in:
Russell Norris 2013-07-10 10:37:35 -04:00 committed by Ben Atkins
parent 15a94ac3e8
commit 60e5d9cbd0
1 changed files with 1 additions and 1 deletions

View File

@ -363,7 +363,7 @@ You can find out whether a model instance is the current, live one -- or whether
If your `ApplicationController` has a `current_user` method, PaperTrail will store the value it returns in the `version`'s `whodunnit` column. Note that this column is a string so you will have to convert it to an integer if it's an id and you want to look up the user later on:
```ruby
>> last_change = Widget.versions.last
>> last_change = widget.versions.last
>> user_who_made_the_change = User.find last_change.whodunnit.to_i
```