Use string interpolation
This commit is contained in:
parent
83be054884
commit
80ed589a17
10 changed files with 14 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue