Commit 8d620e39 authored by Jan-Gerd Tenberge's avatar Jan-Gerd Tenberge

Add scale argument in user class

parent f93177c6
......@@ -68,13 +68,13 @@ module ApplicationHelper
end
end
def avatar_icon(user_email = '', size = nil)
def avatar_icon(user_email = '', size = nil, scale = 2)
user = User.find_by(email: user_email)
if user
user.avatar_url(size) || default_avatar
else
gravatar_icon(user_email, size)
gravatar_icon(user_email, size, scale)
end
end
......
......@@ -633,11 +633,11 @@ class User < ActiveRecord::Base
email.start_with?('temp-email-for-oauth')
end
def avatar_url(size = nil)
def avatar_url(size = nil, scale = 2)
if avatar.present?
[gitlab_config.url, avatar.url].join
else
GravatarService.new.execute(email, size)
GravatarService.new.execute(email, size, scale)
end
end
......
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