fix some glitches in gravatar image url generation

always use proper size value
do not show alt text when avatar image not loaded
This commit is contained in:
Sergey Linnik 2012-11-19 02:36:50 +04:00
parent 552c2d665b
commit 2c37fa381e
2 changed files with 4 additions and 2 deletions

View file

@ -30,7 +30,9 @@ module ApplicationHelper
args.any? { |v| v.to_s.downcase == action_name }
end
def gravatar_icon(user_email = '', size = 40)
def gravatar_icon(user_email = '', size = nil)
size = 40 if size.nil? || size <= 0
if Gitlab.config.disable_gravatar? || user_email.blank?
'no_avatar.png'
else