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 don't create trail on destroy with Rails 3.0.2

This commit is contained in:
Franco Catena 2010-11-16 15:34:50 -03:00
parent 5db477e0bb
commit 9f431664db

View file

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