Fix quote mailer preview to use the latest quote notification (#36373)

This commit is contained in:
Renaud Chaput authored and GitHub committed 2025-10-07 10:19:53 +00:00
1 parent 9027d60420
commit e8dab026bb
1 file changed
+3 -1
@@ -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