2
0

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

This commit is contained in:
Renaud Chaput
2025-10-07 12:19:53 +02:00
committed by GitHub
parent 9027d60420
commit e8dab026bb

View File

@@ -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