Commit babb6a1a authored by Wouter D'Haeseleer's avatar Wouter D'Haeseleer

Define a default value as suggested by ariejan

parent 825d2d69
require 'digest/md5'
module ApplicationHelper
def gravatar_icon(user_email, size = 40)
def gravatar_icon(user_email = '', size = 40)
gravatar_host = request.ssl? ? "https://secure.gravatar.com" : "http://www.gravatar.com"
user_email ||= ''
user_email.strip!
"#{gravatar_host}/avatar/#{Digest::MD5.hexdigest(user_email.downcase)}?s=#{size}&d=identicon"
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment