: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
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)
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