Commit df6f74817910e2e3263f214733636ba1d0da41b8
Exists in
master
and in
4 other branches
Merge pull request #459 from patthoyts/pt/gravatar-fix
Generate consistent gravatar hash values as per documentation.
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
app/helpers/application_helper.rb
... | ... | @@ -3,7 +3,8 @@ module ApplicationHelper |
3 | 3 | |
4 | 4 | def gravatar_icon(user_email, size = 40) |
5 | 5 | gravatar_host = request.ssl? ? "https://secure.gravatar.com" : "http://www.gravatar.com" |
6 | - "#{gravatar_host}/avatar/#{Digest::MD5.hexdigest(user_email)}?s=#{size}&d=identicon" | |
6 | + user_email.strip! | |
7 | + "#{gravatar_host}/avatar/#{Digest::MD5.hexdigest(user_email.downcase)}?s=#{size}&d=identicon" | |
7 | 8 | end |
8 | 9 | |
9 | 10 | def fixed_mode? | ... | ... |