Class: Profile

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/profile.rb

Instance Method Summary collapse

Instance Method Details

#gravatarObject


11
12
13
14
15
16
17
18
# File 'app/models/profile.rb', line 11

def gravatar
  if avatar and not avatar.empty?
    avatar
  else
    gravatar_id = Digest::MD5::hexdigest(user.email).downcase
    "http://gravatar.com/avatar/#{gravatar_id}.png"
  end
end