Use string interpolation

This commit is contained in:
gregoirenovel 2018-01-15 21:41:16 +01:00
parent 83be054884
commit 80ed589a17
10 changed files with 14 additions and 14 deletions

View file

@ -8,7 +8,7 @@ class PiecesJustificativesService
.partition { |_, content| ClamavService.safe_file?(content.path) }
errors = with_virus
.map { |_, content| content.original_filename + ' : virus détecté' }
.map { |_, content| "#{content.original_filename} : virus détecté" }
errors += without_virus
.map { |tpj, content| save_pj(content, dossier, tpj, user) }
@ -26,7 +26,7 @@ class PiecesJustificativesService
pj.save
else
pj = PieceJustificative.new
pj.errors.add(:content, content.original_filename + ': <b>Virus détecté !!</b>')
pj.errors.add(:content, "#{content.original_filename} : <b>Virus détecté !!</b>")
end
pj