Da drückste Plus
This commit is contained in:
parent
ccc1b47cb3
commit
6ac2e015fd
4
Rakefile
4
Rakefile
|
@ -9,8 +9,8 @@ namespace :justask do
|
||||||
desc "Recount every user's answer/question count."
|
desc "Recount every user's answer/question count."
|
||||||
task recount: :environment do
|
task recount: :environment do
|
||||||
total = User.count
|
total = User.count
|
||||||
progress = ProgressBar.create title: 'Processing user', format: "%t (%c/%C) [%b>%i] %e", starting_at: 1, total: total
|
progress = ProgressBar.create title: 'Processing user', format: "%t (%c/%C) [%b>%i] %e", starting_at: 0, total: total
|
||||||
User.all do |user|
|
User.all.each do |user|
|
||||||
begin
|
begin
|
||||||
answered = Question.where(user: user).count
|
answered = Question.where(user: user).count
|
||||||
asked = Question.where(user: user).where(author_is_anonymous: false).count
|
asked = Question.where(user: user).where(author_is_anonymous: false).count
|
||||||
|
|
Loading…
Reference in New Issue