Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (19 sloc) 0.516 kB
# encoding: utf-8
module UsersHelper
def avatar_url(user)
return '' if user.nil?
return '' if current_account && current_account.hide_avatar?
url = user.avatar.url
options = {
:class => "avatar",
:alt => "",
:width => AvatarUploader::AVATAR_SIZE,
:height => AvatarUploader::AVATAR_SIZE
}
if user.avatar.blank?
options['data-gravatar'] = user.gravatar_hash
url.sub!(/^http:/, 'https:') if request.ssl?
end
image_tag(url, options)
end
end
Jump to Line
Something went wrong with that request. Please try again.