mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-01-18 14:16:00 +01:00
fixed justask:recount
This commit is contained in:
parent
178a01d2f1
commit
40f0e87fdc
1 changed files with 3 additions and 3 deletions
6
Rakefile
6
Rakefile
|
@ -12,9 +12,9 @@ namespace :justask do
|
|||
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
|
||||
answered = Answer.where(user: user).count
|
||||
asked = Question.where(user: user).where(author_is_anonymous: false).count
|
||||
commented = Question.where(user: user).count
|
||||
commented = Comment.where(user: user).count
|
||||
user.answered_count = answered
|
||||
user.asked_count = asked
|
||||
user.commented_count = commented
|
||||
|
@ -43,4 +43,4 @@ namespace :justask do
|
|||
user.save!
|
||||
puts "#{user.screen_name} no longer an admin"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue