FIX: avatar_template when using relative_url_root

This commit is contained in:
Neil Lalonde 2015-04-28 20:58:46 -04:00
parent 3252bf1252
commit b2fd69a675
1 changed files with 2 additions and 2 deletions

View File

@ -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