diff options
Diffstat (limited to 'app/models/upload.rb')
-rw-r--r-- | app/models/upload.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/upload.rb b/app/models/upload.rb index 1bbcc4e381d..99ad37dc892 100644 --- a/app/models/upload.rb +++ b/app/models/upload.rb @@ -14,7 +14,7 @@ class Upload < ActiveRecord::Base # as the FileUploader is not mounted, the default CarrierWave ActiveRecord # hooks are not executed and the file will not be deleted - after_commit :delete_file!, on: :destroy, if: -> { uploader_class <= FileUploader } + after_destroy :delete_file!, if: -> { uploader_class <= FileUploader } def self.hexdigest(path) Digest::SHA256.file(path).hexdigest |