Commit babb6a1a6b6cc08182d4053cf11266a687d79620
1 parent
825d2d69
Exists in
master
and in
4 other branches
Define a default value as suggested by ariejan
Showing
1 changed file
with
1 additions
and
2 deletions
Show diff stats
app/helpers/application_helper.rb
1 | 1 | require 'digest/md5' |
2 | 2 | module ApplicationHelper |
3 | 3 | |
4 | - def gravatar_icon(user_email, size = 40) | |
4 | + def gravatar_icon(user_email = '', size = 40) | |
5 | 5 | gravatar_host = request.ssl? ? "https://secure.gravatar.com" : "http://www.gravatar.com" |
6 | - user_email ||= '' | |
7 | 6 | user_email.strip! |
8 | 7 | "#{gravatar_host}/avatar/#{Digest::MD5.hexdigest(user_email.downcase)}?s=#{size}&d=identicon" |
9 | 8 | end | ... | ... |