Make the uploader use the updated folder

This commit is contained in:
Bob Van Landuyt 2017-06-08 07:23:52 +02:00
parent 565ead6102
commit 2e97db887c
1 changed files with 3 additions and 1 deletions

View File

@ -15,10 +15,12 @@ class GitlabUploader < CarrierWave::Uploader::Base
# This method is overridden in the `FileUploader`
def self.base_dir
return root_dir unless file_storage?
File.join(root_dir, 'system')
end
def self.file_storage?
self.storage.is_a?(CarrierWave::Storage::File)
self.storage == CarrierWave::Storage::File
end
delegate :base_dir, :file_storage?, to: :class