diff --git a/lib/paper_trail/has_paper_trail.rb b/lib/paper_trail/has_paper_trail.rb index 81dbcf58..5b9b9fb4 100644 --- a/lib/paper_trail/has_paper_trail.rb +++ b/lib/paper_trail/has_paper_trail.rb @@ -107,9 +107,10 @@ module PaperTrail def record_destroy if switched_on? and not new_record? - versions.create merge_metadata(:event => 'destroy', - :object => object_to_string(item_before_change), - :whodunnit => PaperTrail.whodunnit) + Version.create merge_metadata(:item => self, + :event => 'destroy', + :object => object_to_string(item_before_change), + :whodunnit => PaperTrail.whodunnit) end end