X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/c672a73de3f376d0981c5bec9cdc3e97d5d0f9b7..01faa2e287812dc4ff025172e3ae36595f2c968f:/app/mailers/notifier.rb?ds=sidebyside diff --git a/app/mailers/notifier.rb b/app/mailers/notifier.rb index 6e0c81a39..b12599981 100644 --- a/app/mailers/notifier.rb +++ b/app/mailers/notifier.rb @@ -1,4 +1,4 @@ -class Notifier < ActionMailer::Base +class Notifier < ApplicationMailer include ActionView::Helpers::AssetUrlHelper self.delivery_job = ActionMailer::MailDeliveryJob @@ -177,7 +177,7 @@ class Notifier < ActionMailer::Base 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"] = File.read(Rails.root.join("app/assets/images/osm_logo_30.png")) end def attach_user_avatar(user) @@ -187,9 +187,9 @@ class Notifier < ActionMailer::Base def user_avatar_file(user) avatar = user&.avatar if avatar&.attached? - return avatar.variant(:resize => "50x50>").blob.download + avatar.variant(:resize => "50x50>").blob.download else - return File.read(Rails.root.join("app", "assets", "images", "avatar_small.png")) + File.read(Rails.root.join("app/assets/images/avatar_small.png")) end end