Sha256: 01dddfafde0ffc5d5ca1484d21afb32cd8e3ebc9f6528dd807802c7577d0eeda
Contents?: true
Size: 483 Bytes
Versions: 17
Compression:
Stored size: 483 Bytes
Contents
module Guts # View helpers for users module UsersHelper # Gets the user's gravatar # @param [Object] user the user's object # @return [String] the image HTML # @note Sets a class of `gravatar` to the image HTML def gravatar_for(user) gravatar_id = Digest::MD5.hexdigest user.email.downcase gravatar_url = "https://secure.gravatar.com/avatar/#{gravatar_id}" image_tag gravatar_url, alt: user.name, class: 'gravatar' end end end
Version data entries
17 entries across 17 versions & 1 rubygems