Commit b963a3fc7fb7df7853c97d5763dd2e11e35072e1
1 parent
19215647
Exists in
master
Fix ranking job
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/dialoga_plugin/ranking_job.rb
... | ... | @@ -19,7 +19,7 @@ class DialogaPlugin::RankingJob < DialogaPlugin::ReportJob |
19 | 19 | filepath = "/tmp/#{report_path}/ranking-#{discussion.slug}_#{article.slug}.csv" |
20 | 20 | CSV.open(filepath, 'w', {:col_sep => ';', :force_quotes => true}) do |csv| |
21 | 21 | csv << ['Posição', 'Id', 'Proposta', 'Positivo', 'Negativo', 'Exibições', 'Valor'] |
22 | - ranking.each_with_index {|r, i| csv << [i+1, r.values].flatten} | |
22 | + ranking.each_with_index {|r, i| csv << [r.position, r.id, r.abstract, r.votes_for, r.votes_against, r.hits, r.effective_support].flatten} | |
23 | 23 | end |
24 | 24 | end |
25 | 25 | end | ... | ... |