From 3a5d3f56f3446704e1e5c1564011d88e257af97c Mon Sep 17 00:00:00 2001 From: Philip Arndt Date: Sat, 28 May 2011 00:32:20 +1200 Subject: Wow, I'm getting good at releasing new versions of this. Fixes size (again). --- app/models/blog_comment.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/models/blog_comment.rb b/app/models/blog_comment.rb index 42059c7..6216cc2 100644 --- a/app/models/blog_comment.rb +++ b/app/models/blog_comment.rb @@ -22,8 +22,8 @@ class BlogComment < ActiveRecord::Base def avatar_url(options = {}) options = {:size => 60} require 'digest/md5' - options[:size] = "?s=#{size}" if options[:size] - "http://gravatar.com/avatar/#{Digest::MD5.hexdigest(self.email.to_s.strip.downcase)}#{options[:size]}.jpg" + size = ("?s=#{options[:size]}" if options[:size]) + "http://gravatar.com/avatar/#{Digest::MD5.hexdigest(self.email.to_s.strip.downcase)}#{size}.jpg" end def approve! -- cgit v1.2.3