Commit d654ce48f466687dd01ae023b68122b0aaba7d3f
1 parent
7629bc22
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', 'Autor', 'Email do Autor'] |
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, r.proposal.created_by.present? ? r.proposal.created_by.name : r.proposal.author_name, r.proposal.created_by.present? ? r.proposal.created_by.email : ''].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, r.proposal.author.present? ? r.proposal.author.name : r.proposal.author_name, r.proposal.author.present? ? r.proposal.author.email : ''].flatten} | |
23 | 23 | end |
24 | 24 | end |
25 | 25 | end | ... | ... |