X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/cd5d54ce4e65629facc964c3d6f870ced244f797..9b39577f4646f3624cf24aaa04b06b6f053c3270:/app/mailers/user_mailer.rb diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index ae176c321..33fcc7465 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -183,7 +183,7 @@ class UserMailer < ApplicationMailer end def attach_project_logo - attachments.inline["logo.png"] = File.read(Rails.root.join("app/assets/images/osm_logo_30.png")) + attachments.inline["logo.png"] = Rails.root.join("app/assets/images/osm_logo_30.png").read end def attach_user_avatar(user) @@ -194,13 +194,12 @@ class UserMailer < ApplicationMailer avatar = user&.avatar if avatar&.attached? if avatar.variable? - image = avatar.variant(:resize_to_limit => [50, 50]).processed - image.service.download(image.key) + avatar.variant(:resize_to_limit => [50, 50]).download else avatar.blob.download end else - File.read(Rails.root.join("app/assets/images/avatar_small.png")) + Rails.root.join("app/assets/images/avatar_small.png").read end end