Skip to content

Instantly share code, notes, and snippets.

@jhamon

jhamon/gravatar.rb

Created May 2, 2014
Embed
What would you like to do?
Build the gravitar image avatar url from a user email address.
require 'openssl'
def gravitar_url(email)
base = 'http://www.gravatar.com/avatar/'
base + OpenSSL::Digest::MD5.new(email).to_s
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.