fix: Add default 404 param on gravatar (#1316)

This commit is contained in:
Pranav Raj S
2020-10-05 23:31:23 +05:30
committed by GitHub
parent 88b2469dc8
commit db1953de24

View File

@@ -114,7 +114,7 @@ class User < ApplicationRecord
def avatar_url
if avatar_img_url == ''
hash = Digest::MD5.hexdigest(email)
return "https://www.gravatar.com/avatar/#{hash}"
return "https://www.gravatar.com/avatar/#{hash}?d=404"
end
avatar_img_url
end