Merge branch 'master' of git.rrerr.net:justask/justask

This commit is contained in:
pixeldesu 2014-12-12 16:50:23 +01:00
commit 38c08970c8
2 changed files with 5 additions and 4 deletions

View file

@ -52,6 +52,7 @@ module ApplicationHelper
def gravatar_url(user) def gravatar_url(user)
return '//www.gravatar.com/avatar' if user.nil? 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)}" "//www.gravatar.com/avatar/#{Digest::MD5.hexdigest(user.email)}"
end end

View file

@ -18,15 +18,15 @@
%br/ %br/
.media .media
.pull-left .pull-left
%a= show_user_profile_path('nilsding'.screen_name) %a{href: show_user_profile_path('nilsding')}
%img.img-rounded.answerbox--img{src: gravatar_url('nilsding')} %img.img-rounded.answerbox--img{src: gravatar_url('nilsding@nilsding.org')}
.media-body .media-body
%h4.entry-text.entry-about nilsding %h4.entry-text.entry-about nilsding
%h6.entry-subtext Backend, Server & Code %h6.entry-subtext Backend, Server & Code
.media .media
.pull-left .pull-left
%a= show_user_profile_path('pixeldesu'.screen_name) %a{href: show_user_profile_path('pixeldesu')}
%img.img-rounded.answerbox--img{src: gravatar_url('pixeldesu')} %img.img-rounded.answerbox--img{src: gravatar_url('pixeldesu@outlook.com')}
.media-body .media-body
%h4.entry-text.entry-about pixeldesu %h4.entry-text.entry-about pixeldesu
%h6.entry-subtext Frontend Design & Layout %h6.entry-subtext Frontend Design & Layout