[Fix #3064] If procedure has logo, then display it in emails
This commit is contained in:
parent
b3970a5e6f
commit
7e551a9d8d
3 changed files with 13 additions and 1 deletions
|
@ -38,6 +38,11 @@ class NotificationMailer < ApplicationMailer
|
|||
|
||||
@dossier = dossier
|
||||
|
||||
if dossier.procedure.logo?
|
||||
@logo_filename = dossier.procedure.logo.filename
|
||||
attachments.inline[@logo_filename] = dossier.procedure.logo.read
|
||||
end
|
||||
|
||||
mail(subject: subject, to: email) do |format|
|
||||
# rubocop:disable Rails/OutputSafety
|
||||
format.html { render(html: body.html_safe, layout: 'mailers/notification') }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue