justask:recount now recounts the friend/follower_count

This commit is contained in:
nilsding 2014-11-30 14:56:06 +01:00
parent 4db8f8f33f
commit 63be00f70f
1 changed files with 2 additions and 0 deletions

View File

@ -15,6 +15,8 @@ namespace :justask do
answered = Answer.where(user: user).count
asked = Question.where(user: user).where(author_is_anonymous: false).count
commented = Comment.where(user: user).count
user.friend_count = user.friends.count
user.follower_count = user.followers.count
user.answered_count = answered
user.asked_count = asked
user.commented_count = commented