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