handle nil mailers
This commit is contained in:
parent
4391be1aa0
commit
95860dfc55
2 changed files with 7 additions and 3 deletions
|
@ -1,4 +1,6 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<% mail = ApplicationMailer.mail_for_notification(@notification) %>
|
<% mail = ApplicationMailer.mail_for_notification(@notification) %>
|
||||||
<% @notification.update(body: mail.html_part&.body&.decoded) %>
|
<% if mail %>
|
||||||
<%= raw mail.html_part&.body&.decoded %>
|
<% @notification.update(body: mail.html_part&.body&.decoded) %>
|
||||||
|
<%= raw mail.html_part&.body&.decoded %>
|
||||||
|
<% end %>
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
<% mail = ApplicationMailer.mail_for_notification(@notification) %>
|
<% mail = ApplicationMailer.mail_for_notification(@notification) %>
|
||||||
<%= mail.text_part&.body&.decoded %>
|
<% if mail %>
|
||||||
|
<%= mail.text_part&.body&.decoded %>
|
||||||
|
<% end %>
|
||||||
|
|
Loading…
Add table
Reference in a new issue