Use Discourse.current_hostname

Much cleaner.
This commit is contained in:
Matt Palmer 2015-10-02 17:27:54 +10:00
parent c09f345cff
commit af4a48a67c
1 changed files with 1 additions and 1 deletions

View File

@ -475,7 +475,7 @@ class User < ActiveRecord::Base
url.gsub! "{color}", letter_avatar_color(username.downcase) url.gsub! "{color}", letter_avatar_color(username.downcase)
url.gsub! "{username}", username url.gsub! "{username}", username
url.gsub! "{first_letter}", username[0].downcase url.gsub! "{first_letter}", username[0].downcase
url.gsub! "{hostname}", RailsMultisite::ConnectionManagement.current_hostname url.gsub! "{hostname}", Discourse.current_hostname
url url
else else
"#{Discourse.base_uri}/letter_avatar/#{username.downcase}/{size}/#{LetterAvatar.version}.png" "#{Discourse.base_uri}/letter_avatar/#{username.downcase}/{size}/#{LetterAvatar.version}.png"