Commit 17f41d4a49dc78b651d90da0636a87f7830c48de
1 parent
a71af58e
Exists in
master
Update only profiles that is in control group
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
script/process_merit_rules.rb
... | ... | @@ -105,7 +105,7 @@ Environment.all.each do |environment| |
105 | 105 | end |
106 | 106 | |
107 | 107 | amount = environment.people.count |
108 | - environment.people.each.with_index(1) do |person, person_index| | |
108 | + environment.people.find_each(:conditions => conditions).with_index(1) do |person, person_index| | |
109 | 109 | puts "Updating #{person.identifier} level #{person_index}/#{amount}" |
110 | 110 | person.update_attribute(:level, person.gamification_plugin_calculate_level) |
111 | 111 | end | ... | ... |