diff app/models/paste.rb @ 255:a894d7696b7e

More useful return of Paste.fix_all.
author edogawaconan <me@myconan.net>
date Mon, 14 Oct 2013 17:49:52 +0000
parents 9aa67da381b0
children 6cca1ab53337
line wrap: on
line diff
--- a/app/models/paste.rb	Tue Oct 15 01:47:19 2013 +0900
+++ b/app/models/paste.rb	Mon Oct 14 17:49:52 2013 +0000
@@ -52,8 +52,12 @@
   end
 
   def self.fix_all
+    stats = Hash.new(0)
     self.all.each do |p|
       p.save
+      stats[:count] += 1
+      stats[:private] += 1 if p.secret
     end
+    return stats
   end
 end