diff options
Diffstat (limited to 'app/models/attachment.rb')
-rw-r--r-- | app/models/attachment.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/attachment.rb b/app/models/attachment.rb index d1d7c6dd0..5fa89ee5a 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -53,7 +53,7 @@ class Attachment < ActiveRecord::Base @@thumbnails_storage_path = File.join(Rails.root, "tmp", "thumbnails") before_create :files_to_final_location - after_destroy :delete_from_disk + after_commit :delete_from_disk, :on => :destroy # Returns an unsaved copy of the attachment def copy(attributes=nil) |