diff --git a/script/process_merit_rules.rb b/script/process_merit_rules.rb index 030fdb7..1341c9e 100755 --- a/script/process_merit_rules.rb +++ b/script/process_merit_rules.rb @@ -50,6 +50,11 @@ Environment.all.each do |environment| article.comments.each.with_index(1) do |comment, i| create_action(comment, i, comment_count) end + + followed_articles_count = article.article_followers.count + article.article_followers.each_with_index do |af, i| + create_action(af, i, followed_articles_count) + end end environment.people.each.with_index(1) do |person, person_index| @@ -57,6 +62,11 @@ Environment.all.each do |environment| person.votes.each.with_index(1) do |vote, vote_index| create_action(vote, vote_index, vote_count) end + + friendship_count = person.friends.count + person.friends.each_with_index do |friend, index| + create_action(friend, index, friendship_count) + end end environment.people.each.with_index(1) do |person, person_index| -- libgit2 0.21.2