Update "Has-One Associations" section in README [ci skip]

This commit is contained in:
Kamil Kieliszczyk 2014-03-12 10:03:32 +01:00
parent 44a632eea6
commit 5aea822771
1 changed files with 6 additions and 0 deletions

View File

@ -597,8 +597,14 @@ If you can think of a good way to achieve this, please let me know.
PaperTrail can restore `:has_one` associations as they were at (actually, 3 seconds before) the time.
```ruby
class Location < ActiveRecord::Base
belongs_to :treasure
has_paper_trail
end
class Treasure < ActiveRecord::Base
has_one :location
has_paper_trail
end
>> treasure.amount # 100