From 6ac2e015fd6f03436201375f50bf6d91aa843332 Mon Sep 17 00:00:00 2001 From: nilsding Date: Fri, 28 Nov 2014 22:11:36 +0100 Subject: [PATCH] =?UTF-8?q?Da=20dr=C3=BCckste=20Plus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rakefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index dd550447..9cd93330 100644 --- a/Rakefile +++ b/Rakefile @@ -9,8 +9,8 @@ namespace :justask do desc "Recount every user's answer/question count." task recount: :environment do total = User.count - progress = ProgressBar.create title: 'Processing user', format: "%t (%c/%C) [%b>%i] %e", starting_at: 1, total: total - User.all do |user| + progress = ProgressBar.create title: 'Processing user', format: "%t (%c/%C) [%b>%i] %e", starting_at: 0, total: total + User.all.each do |user| begin answered = Question.where(user: user).count asked = Question.where(user: user).where(author_is_anonymous: false).count