BigW Consortium Gitlab

Commit 8a66a10c by Dmitriy Zaporozhets

Merge branch 'fix_avatar_url' into 'master'

Remove unnecessary / from avatar url ## What does this MR do? This MR removes the unecessary / from the avatar url. ## What Use Case does this MR solve? The // in the url cold lead to avatars not being displayed (reported on IRC) With this MR the avatar url changes from http://localhost:3000//uploads/user/avatar/1/gitlab_logo.png to http://localhost:3000/uploads/user/avatar/1/gitlab_logo.png @dblessing Can you take a look? See merge request !303
parents 2395b8f0 6bf58e76
......@@ -497,7 +497,7 @@ class User < ActiveRecord::Base
def avatar_url(size = nil)
if avatar.present?
[gitlab_config.url, avatar.url].join("/")
[gitlab_config.url, avatar.url].join
else
GravatarService.new.execute(email, size)
end
......
......@@ -73,7 +73,7 @@ describe ApplicationHelper do
user = create(:user)
user.avatar = File.open(avatar_file_path)
user.save!
avatar_icon(user.email).to_s.should match("/gitlab//uploads/user/avatar/#{ user.id }/gitlab_logo.png")
avatar_icon(user.email).to_s.should match("/gitlab/uploads/user/avatar/#{ user.id }/gitlab_logo.png")
end
it "should call gravatar_icon when no avatar is present" do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment