Commit 6b56cd1f97033f4d53ac9d821261ac1928cb7cc6
1 parent
de16257d
Exists in
master
and in
1 other branch
fix wrong category reference
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
script/export_ranking.rb
... | ... | @@ -12,7 +12,7 @@ CSV.open( "ranking_gamification.csv", 'w' ) do |csv| |
12 | 12 | Person.find_each do |person| |
13 | 13 | count += 1 |
14 | 14 | gamification_categories = categories.map{ |c| GamificationPlugin::PointsCategorization.for_type(c).first} |
15 | - categories_values = gamification_categories.map{|c| person.score_points(c.id.to_s).sum(:num_points)} | |
15 | + categories_values = gamification_categories.map{|c| person.score_points(:category => c.id.to_s).sum(:num_points)} | |
16 | 16 | person_articles = Article.where(:author_id => person.id) |
17 | 17 | puts "Exporting '#{person.identifier}' #{count}/#{amount}" |
18 | 18 | ... | ... |