X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/dbf35e0cf67ee330cd02c2431e0ed6d08681d184..81ce6a7de0be8ada90ebc587506d957d609babfa:/app/mailers/user_mailer.rb diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index 0664b8475..c5c0118e6 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -123,7 +123,7 @@ class UserMailer < ApplicationMailer def note_comment_notification(comment, recipient) with_recipient_locale recipient do - @noteurl = browse_note_url(comment.note) + @noteurl = note_url(comment.note) @place = Nominatim.describe_location(comment.note.lat, comment.note.lon, 14, I18n.locale) @comment = comment.body @owner = recipient == comment.note.author @@ -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 => "50x50>").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