From e8dab026bbc2ec46eb82a78770994ad9a3512c9a Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Tue, 7 Oct 2025 12:19:53 +0200 Subject: [PATCH] Fix quote mailer preview to use the latest quote notification (#36373) --- spec/mailers/previews/notification_mailer_preview.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/mailers/previews/notification_mailer_preview.rb b/spec/mailers/previews/notification_mailer_preview.rb index ae2d6802b..29ab047df 100644 --- a/spec/mailers/previews/notification_mailer_preview.rb +++ b/spec/mailers/previews/notification_mailer_preview.rb @@ -35,7 +35,9 @@ class NotificationMailerPreview < ActionMailer::Preview # Preview this email at http://localhost:3000/rails/mailers/notification_mailer/quote def quote - activity = Quote.first + notification = Notification.where(type: 'quote').order(:created_at).last + activity = notification.activity + mailer_for(activity.quoted_account, activity).quote end