mirror of
https://github.com/paper-trail-gem/paper_trail.git
synced 2022-11-09 11:33:19 -05:00
Fix vague problem with Rails 3 associations on destroyed object.
NOTE: there is no test for this :( See https://github.com/airblade/paper_trail/issues#issue/38
This commit is contained in:
parent
52a591a847
commit
f685c92f01
1 changed files with 2 additions and 1 deletions
|
@ -111,7 +111,8 @@ module PaperTrail
|
|||
|
||||
def record_destroy
|
||||
if switched_on? and not new_record?
|
||||
Version.create merge_metadata(:item => self,
|
||||
Version.create merge_metadata(:item_id => self.id,
|
||||
:item_type => self.class.name,
|
||||
:event => 'destroy',
|
||||
:object => object_to_string(item_before_change),
|
||||
:whodunnit => PaperTrail.whodunnit)
|
||||
|
|
Loading…
Reference in a new issue