Set STORAGE_URL during initialization

This commit is contained in:
Guillaume Lazzara 2016-07-05 11:50:45 +02:00
parent dfbd584b74
commit aebc673cdc
3 changed files with 4 additions and 4 deletions

View file

@ -1,11 +1,9 @@
class RemoteDownloader
DEST_URL = "https://storage.apientreprise.fr/" + CarrierWave::Uploader::Base.fog_directory + '/'
def initialize(filename)
@filename = filename
end
def url
@url ||= File.join(DEST_URL, @filename)
@url ||= File.join(STORAGE_URL, @filename)
end
end