mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-02-13 21:33:20 +01:00
gravatar_url returns the users' profile_picture
This commit is contained in:
parent
cf3933271a
commit
501f039e7f
1 changed files with 1 additions and 0 deletions
|
@ -60,6 +60,7 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
def gravatar_url(user)
|
||||
return user.profile_picture.url
|
||||
# return '/cage.png'
|
||||
return '//www.gravatar.com/avatar' if user.nil?
|
||||
return "//www.gravatar.com/avatar/#{Digest::MD5.hexdigest(user)}" if user.is_a? String
|
||||
|
|
Loading…
Reference in a new issue