Remove unnecessary / from avatar url
So http://localhost:3000//uploads/user/avatar/1/avatar.png becomes http://localhost:3000/uploads/user/avatar/1/avatar.png
This commit is contained in:
parent
2fba31890e
commit
6bf58e76bd
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue