Fix missing avatars in notification bundle emails

This commit is contained in:
Stanko K.R.
2025-11-20 10:33:42 +01:00
parent 19d8e41b38
commit cc41a42221
5 changed files with 10 additions and 12 deletions
-5
View File
@@ -5,9 +5,4 @@ class MagicLinkMailer < ApplicationMailer
mail to: @identity.email_address, subject: "Your Fizzy verification code"
end
private
def default_url_options
Rails.application.config.action_mailer.default_url_options
end
end
+5 -3
View File
@@ -38,11 +38,13 @@ class Notification::Bundle < ApplicationRecord
def deliver
user.in_time_zone do
processing!
Current.with_account(user.account) do
processing!
Notification::BundleMailer.notification(self).deliver if deliverable?
Notification::BundleMailer.notification(self).deliver if deliverable?
delivered!
delivered!
end
end
end
@@ -1,4 +1,4 @@
class MagicLinkPreview < ActionMailer::Preview
class MagicLinkMailerPreview < ActionMailer::Preview
def magic_link
identity = Identity.new email_address: "test@example.com"
magic_link = MagicLink.new(identity: identity)
@@ -1,6 +1,7 @@
class Notification::BundleMailerPreview < ActionMailer::Preview
def notification
ApplicationRecord.current_tenant = "897362094"
Notification::BundleMailer.notification Notification::Bundle.take!
bundle = Notification::Bundle.all.sample
Notification::BundleMailer.notification bundle
end
end
+1 -1
View File
@@ -1,7 +1,7 @@
class UserMailerPreview < ActionMailer::Preview
def email_change_confirmation
new_email_address = "new.email@example.com"
user = User.all.sample
user = User.active.sample
token = user.send(:generate_email_address_change_token, to: new_email_address)
UserMailer.email_change_confirmation(