Module: CornStarch::GravatarHelper
- Defined in:
- app/helpers/corn_starch/gravatar_helper.rb
Overview
Gravatar Helper
Instance Method Summary collapse
-
#gravatar_img(email, size = 64, options = {}) ⇒ Object
Gravatar Image.
-
#gravatar_url(email, size = 64) ⇒ Object
Gravatar URL.
Instance Method Details
#gravatar_img(email, size = 64, options = {}) ⇒ Object
Gravatar Image
11 12 13 |
# File 'app/helpers/corn_starch/gravatar_helper.rb', line 11 def gravatar_img email, size = 64, = {} image_tag gravatar_url(email, size), end |
#gravatar_url(email, size = 64) ⇒ Object
Gravatar URL
16 17 18 19 |
# File 'app/helpers/corn_starch/gravatar_helper.rb', line 16 def gravatar_url email, size = 64 gravatar_id = Digest::MD5.hexdigest(email.downcase) "https://gravatar.com/avatar/#{gravatar_id}.png?s=#{size}" end |