From b2fd69a675f95c4222297c5ec66c15e0035b26ba Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Tue, 28 Apr 2015 20:58:46 -0400 Subject: [PATCH] FIX: avatar_template when using relative_url_root --- app/models/user.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index ca68e277b57..19431c099dd 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -415,11 +415,11 @@ class User < ActiveRecord::Base return letter_avatar_template(username) if !uploaded_avatar_id id = uploaded_avatar_id username ||= "" - "/user_avatar/#{RailsMultisite::ConnectionManagement.current_hostname}/#{username.downcase}/{size}/#{id}.png" + "#{Discourse.base_uri}/user_avatar/#{RailsMultisite::ConnectionManagement.current_hostname}/#{username.downcase}/{size}/#{id}.png" end def self.letter_avatar_template(username) - "/letter_avatar/#{username.downcase}/{size}/#{LetterAvatar.version}.png" + "#{Discourse.base_uri}/letter_avatar/#{username.downcase}/{size}/#{LetterAvatar.version}.png" end def avatar_template