From 1f1b0f278be73091763b9133db6660b504f63fac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?U=C4=A3is=20Ozols?= Date: Tue, 31 Jul 2012 08:31:12 +0300 Subject: Move avatar_url method to posts helper because view stuff shouldn't be in the model. --- app/models/refinery/blog/comment.rb | 7 ------- 1 file changed, 7 deletions(-) (limited to 'app/models') diff --git a/app/models/refinery/blog/comment.rb b/app/models/refinery/blog/comment.rb index b57e16f..afd806f 100644 --- a/app/models/refinery/blog/comment.rb +++ b/app/models/refinery/blog/comment.rb @@ -33,13 +33,6 @@ module Refinery self.per_page = Refinery::Blog.comments_per_page - def avatar_url(options = {}) - options = {:size => 60} - require 'digest/md5' - 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! self.update_column(:state, 'approved') end -- cgit v1.2.3