1
0
Fork 0
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:
Andy Stewart 2011-03-16 16:36:56 +01:00
parent 52a591a847
commit f685c92f01

View file

@ -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)