Make default_avatar return a full path.

Callers expect a URL.

This fixes the avatars in commit lists when a user has no avatar and
Gravatar is disabled.

Closes #38715
This commit is contained in:
Felix Geyer 2018-01-23 23:25:44 +01:00
parent dc325c672e
commit 94039bd7ca
2 changed files with 3 additions and 3 deletions

View File

@ -89,7 +89,7 @@ module ApplicationHelper
end
def default_avatar
'no_avatar.png'
asset_path('no_avatar.png')
end
def last_commit(project)

View File

@ -100,7 +100,7 @@ describe ApplicationHelper do
end
it 'returns a generic avatar' do
expect(helper.gravatar_icon(user_email)).to match('no_avatar.png')
expect(helper.gravatar_icon(user_email)).to match_asset_path('no_avatar.png')
end
end
@ -110,7 +110,7 @@ describe ApplicationHelper do
end
it 'returns a generic avatar when email is blank' do
expect(helper.gravatar_icon('')).to match('no_avatar.png')
expect(helper.gravatar_icon('')).to match_asset_path('no_avatar.png')
end
it 'returns a valid Gravatar URL' do