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:
authorJan Provaznik <jprovaznik@gitlab.com>2018-12-05 22:26:45 +0300
committerJan Provaznik <jprovaznik@gitlab.com>2018-12-07 00:00:19 +0300
commitd039c16794c6ee267df658a44f05d980f2e66e9b (patch)
treec5c53d7ddc3c32fb1986ae484b295109048633bd /app/models/concerns/with_uploads.rb
parent4ded04119ce70f7a5dd8a49434675355563b591e (diff)
Fixed before_destroy callback
remove_file_uploads should be called both with and w/o the flag - we need to decide which way to use on instance level.
Diffstat (limited to 'app/models/concerns/with_uploads.rb')
-rw-r--r--app/models/concerns/with_uploads.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/concerns/with_uploads.rb b/app/models/concerns/with_uploads.rb
index 83b085ccce8..d79c0eae77e 100644
--- a/app/models/concerns/with_uploads.rb
+++ b/app/models/concerns/with_uploads.rb
@@ -31,7 +31,7 @@ module WithUploads
# TODO: when feature flag is removed, we can use just dependent: destroy
# option on :file_uploads
- before_destroy :remove_file_uploads, unless: :fast_destroy_enabled?
+ before_destroy :remove_file_uploads
use_fast_destroy :file_uploads, if: :fast_destroy_enabled?
end