aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/refinery/blog/posts_helper.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/helpers/refinery/blog/posts_helper.rb b/app/helpers/refinery/blog/posts_helper.rb
index dfb742a..2daa5f6 100644
--- a/app/helpers/refinery/blog/posts_helper.rb
+++ b/app/helpers/refinery/blog/posts_helper.rb
@@ -28,6 +28,11 @@ module Refinery
Refinery::Blog::Post.published_dates_older_than(cutoff)
end
+ def avatar_url(email, options = {:size => 60})
+ require 'digest/md5'
+ "http://gravatar.com/avatar/#{Digest::MD5.hexdigest(email.to_s.strip.downcase)}?s=#{options[:size]}.jpg"
+ end
+
class ArchiveWidget
delegate :t, :link_to, :refinery, :render, :to => :view_context
attr_reader :view_context