Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicaël Bergeron <mbergeron@gitlab.com>2018-01-31 18:59:35 +0300
committerMicaël Bergeron <mbergeron@gitlab.com>2018-02-06 16:48:56 +0300
commit939391af7bc471f1588ab75ab0cf08d8e4286a05 (patch)
tree54bdc9b0ef372395373d765f69ce00ecff26a4c6 /app/models/upload.rb
parentb176b2ca8d87ac7a090dd4b67f6a9e87c8753389 (diff)
improvements from feedback
Diffstat (limited to 'app/models/upload.rb')
-rw-r--r--app/models/upload.rb2
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