Fix carrierwave root issues

This commit is contained in:
Guillaume Lazzara 2016-05-24 18:35:25 +02:00
parent a62076c34b
commit 7fbee7a5b5
5 changed files with 8 additions and 4 deletions

View file

@ -14,7 +14,7 @@ class Cerfa < ActiveRecord::Base
if Features.remote_storage
(RemoteDownloader.new content.filename).url
else
(LocalDownloader.new content, 'CERFA').url
(LocalDownloader.new content.path, 'CERFA').url
end
end
end

View file

@ -22,7 +22,7 @@ class PieceJustificative < ActiveRecord::Base
if Features.remote_storage
(RemoteDownloader.new content.filename).url
else
(LocalDownloader.new content,
(LocalDownloader.new content.path,
(type_de_piece_justificative.nil? ? content.original_filename : type_de_piece_justificative.libelle)).url
end
end