Merge branch 'fix/avatar_relative_url' into 'master'

Fix Avatar and Relative URL

Fixes https://github.com/gitlabhq/gitlabhq/issues/7270

Instead of `URI::join` use a simple join with a slash. This is how all other places in GitLab join URLs and it doesn't muck with the relative path.

See merge request !144
This commit is contained in:
Dmitriy Zaporozhets 2014-07-21 10:34:41 +00:00
commit 72f50fcb2c
1 changed files with 1 additions and 1 deletions

View File

@ -471,7 +471,7 @@ class User < ActiveRecord::Base
def avatar_url(size = nil)
if avatar.present?
URI::join(gitlab_config.url, avatar.url).to_s
[gitlab_config.url, avatar.url].join("/")
else
GravatarService.new.execute(email, size)
end