X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/1e19e80d0e2420a1ca1951d364d4a95d159eceeb..a28f264ad18605f6e95fde7aafe7217335831227:/app/models/notifier.rb diff --git a/app/models/notifier.rb b/app/models/notifier.rb index 8e386edf8..1eb39e678 100644 --- a/app/models/notifier.rb +++ b/app/models/notifier.rb @@ -4,6 +4,7 @@ class Notifier < ActionMailer::Base :auto_submitted => "auto-generated" helper :application before_action :set_shared_template_vars + before_action :attach_project_logo def signup_confirm(user, token) with_recipient_locale user do @@ -191,11 +192,10 @@ class Notifier < ActionMailer::Base def set_shared_template_vars @root_url = root_url(:host => SERVER_URL) - attach_project_logo end def attach_project_logo - attachments.inline["logo.png"] = File.read("#{Rails.root}/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) @@ -207,7 +207,7 @@ class Notifier < ActionMailer::Base if image && image.file? return image.path(:small) else - return "#{Rails.root}/app/assets/images/users/images/small.png" + return Rails.root.join("app", "assets", "images", "users", "images", "small.png") end end