From 7c473e444e059f34989071c5e005f92d1be5f243 Mon Sep 17 00:00:00 2001 From: Hugo Melo Date: Mon, 19 Oct 2015 22:45:38 -0200 Subject: [PATCH] Process profile merit actions also --- script/process_merit_rules.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/script/process_merit_rules.rb b/script/process_merit_rules.rb index 1341c9e..d8ed49a 100755 --- a/script/process_merit_rules.rb +++ b/script/process_merit_rules.rb @@ -24,11 +24,11 @@ end #puts "Destroy all merit actions" #Merit::Action.destroy_all -# + #count = Person.count #Person.all.each.with_index(1) do |person, i| -# puts "#{i}/#{count} Remove sash from #{person.identifier}" -# person.sash.destroy unless person.sash.nil? + #puts "#{i}/#{count} Remove sash from #{person.identifier}" + #person.sash.destroy unless person.sash.nil? #end Merit.observers << 'ProcessObserver' @@ -57,7 +57,10 @@ Environment.all.each do |environment| end end + people_count = environment.people.count environment.people.each.with_index(1) do |person, person_index| + create_action(person, person_index, people_count) + vote_count = person.votes.count person.votes.each.with_index(1) do |vote, vote_index| create_action(vote, vote_index, vote_count) -- libgit2 0.21.2