Module: Concerns::User::Gravatar

Defined in:
app/models/faalis/concerns/user/gravatar.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) gravatar



3
4
5
6
7
8
9
# File 'app/models/faalis/concerns/user/gravatar.rb', line 3

def gravatar
  require 'digest/md5'
  hash = Digest::MD5.hexdigest(email.downcase)

  # compile URL which can be used in <img src="RIGHT_HERE"...
  "http://www.gravatar.com/avatar/#{hash}"
end