Commit 7c473e444e059f34989071c5e005f92d1be5f243
1 parent
56f737fc
Exists in
master
and in
1 other branch
Process profile merit actions also
Showing
1 changed file
with
6 additions
and
3 deletions
Show diff stats
script/process_merit_rules.rb
... | ... | @@ -24,11 +24,11 @@ end |
24 | 24 | |
25 | 25 | #puts "Destroy all merit actions" |
26 | 26 | #Merit::Action.destroy_all |
27 | -# | |
27 | + | |
28 | 28 | #count = Person.count |
29 | 29 | #Person.all.each.with_index(1) do |person, i| |
30 | -# puts "#{i}/#{count} Remove sash from #{person.identifier}" | |
31 | -# person.sash.destroy unless person.sash.nil? | |
30 | + #puts "#{i}/#{count} Remove sash from #{person.identifier}" | |
31 | + #person.sash.destroy unless person.sash.nil? | |
32 | 32 | #end |
33 | 33 | |
34 | 34 | Merit.observers << 'ProcessObserver' |
... | ... | @@ -57,7 +57,10 @@ Environment.all.each do |environment| |
57 | 57 | end |
58 | 58 | end |
59 | 59 | |
60 | + people_count = environment.people.count | |
60 | 61 | environment.people.each.with_index(1) do |person, person_index| |
62 | + create_action(person, person_index, people_count) | |
63 | + | |
61 | 64 | vote_count = person.votes.count |
62 | 65 | person.votes.each.with_index(1) do |vote, vote_index| |
63 | 66 | create_action(vote, vote_index, vote_count) | ... | ... |