mark gravatar-url as deprecated

This commit is contained in:
nilsding 2014-12-29 12:56:41 +01:00
parent b378a03afa
commit 7074a1edf7
1 changed files with 4 additions and 3 deletions

View File

@ -59,12 +59,13 @@ module ApplicationHelper
((!current_user.nil?) && ((current_user == user) || current_user.mod?)) ? true : false
end
# @deprecated Use {User#profile_picture.url} instead.
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
"//www.gravatar.com/avatar/#{Digest::MD5.hexdigest(user.email)}"
#return '//www.gravatar.com/avatar' if user.nil?
#return "//www.gravatar.com/avatar/#{Digest::MD5.hexdigest(user)}" if user.is_a? String
#"//www.gravatar.com/avatar/#{Digest::MD5.hexdigest(user.email)}"
end
def ios_web_app?