diff --git a/lib/paper_trail/has_paper_trail.rb b/lib/paper_trail/has_paper_trail.rb index d8d6acf7..fbc1c5cf 100644 --- a/lib/paper_trail/has_paper_trail.rb +++ b/lib/paper_trail/has_paper_trail.rb @@ -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)