Merge pull request #1648 from basecamp/fix-user-avatars-in-notification-bundles
Fix missing avatars in notification bundle emails
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
-1
@@ -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
|
||||
Current.account = bundle.account
|
||||
Notification::BundleMailer.notification bundle
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
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)
|
||||
Current.account = user.account
|
||||
|
||||
UserMailer.email_change_confirmation(
|
||||
email_address: new_email_address,
|
||||
|
||||
Reference in New Issue
Block a user