From ce143201b53a86d39f75d949e5565c7199efb699 Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Sat, 1 Sep 2018 10:50:39 +0200 Subject: [PATCH] Fixed preview of email notifications --- test/mailers/previews/notifications_mailer_preview.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/mailers/previews/notifications_mailer_preview.rb b/test/mailers/previews/notifications_mailer_preview.rb index 2416256..fa7d07a 100644 --- a/test/mailers/previews/notifications_mailer_preview.rb +++ b/test/mailers/previews/notifications_mailer_preview.rb @@ -6,13 +6,17 @@ class NotificationsMailerPreview < ActionMailer::Preview # Preview this email at http://localhost:3000/rails/mailers/notifications_mailer/domain_expires_soon def domain_expires_soon check = Check.domain.first - NotificationsMailer.with(notification: check.notifications.first).domain_expires_soon + NotificationsMailer + .with(check_notification: check.check_notifications.first) + .domain_expires_soon end # Preview this email at http://localhost:3000/rails/mailers/notifications_mailer/ssl_expires_soon def ssl_expires_soon check = Check.ssl.first - NotificationsMailer.with(notification: check.notifications.first).ssl_expires_soon + NotificationsMailer + .with(check_notification: check.check_notifications.first) + .ssl_expires_soon end # Preview this email at http://localhost:3000/rails/mailers/notifications_mailer/recurrent_failures