diff options
author | Michael Kozono <mkozono@gmail.com> | 2017-11-14 22:20:15 -0800 |
---|---|---|
committer | Michael Kozono <mkozono@gmail.com> | 2017-12-01 15:26:41 -0800 |
commit | 0715034805a8f68c66118cf78777bca92ad7cef1 (patch) | |
tree | a83481f51d5bdb04e662b6da5428fa218348e22d /lib | |
parent | dd3ba1f200f0d753a1fafc058b4423f230398dce (diff) | |
download | gitlab-ce-0715034805a8f68c66118cf78777bca92ad7cef1.tar.gz |
Remove irrelevant copy-pasted code
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/background_migration/populate_untracked_uploads.rb | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/lib/gitlab/background_migration/populate_untracked_uploads.rb b/lib/gitlab/background_migration/populate_untracked_uploads.rb index c5f9d998d9e..f2207fa4e72 100644 --- a/lib/gitlab/background_migration/populate_untracked_uploads.rb +++ b/lib/gitlab/background_migration/populate_untracked_uploads.rb @@ -153,29 +153,9 @@ module Gitlab belongs_to :model, polymorphic: true # rubocop:disable Cop/PolymorphicAssociations - validates :size, presence: true - validates :path, presence: true - validates :model, presence: true - validates :uploader, presence: true - before_save :calculate_checksum, if: :foreground_checksum? after_commit :schedule_checksum, unless: :foreground_checksum? - def self.remove_path(path) - where(path: path).destroy_all - end - - def self.record(uploader) - remove_path(uploader.relative_path) - - create( - size: uploader.file.size, - path: uploader.relative_path, - model: uploader.model, - uploader: uploader.class.to_s - ) - end - def absolute_path return path unless relative_path? |