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:
parent
5db477e0bb
commit
9f431664db
1 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue