From 4df8babb9aa2c09e54dde6c36863884b77a093b2 Mon Sep 17 00:00:00 2001 From: Fabiano Leite Date: Wed, 14 Aug 2013 21:55:25 -0300 Subject: [PATCH] Fix url not to be nil --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 062b3f620..70b77e500 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -322,7 +322,7 @@ class User < ActiveRecord::Base if SiteSetting.allow_uploaded_avatars? && use_uploaded_avatar # the avatars might take a while to generate # so return the url of the original image in the meantime - uploaded_avatar_template.present? ? uploaded_avatar_template : uploaded_avatar.url + uploaded_avatar_template.present? ? uploaded_avatar_template : uploaded_avatar.try(:url) else User.gravatar_template(email) end