gauge/app/views/conflicts/index.csv.erb

6 lines
356 B
Plaintext
Raw Normal View History

2016-10-06 22:45:08 +03:00
<%- csv_headers = ['Event'] + @talks.map { |talk| [talk.title, talk.id].join(' ') } -%>
<%= CSV.generate_line(csv_headers).html_safe -%>
<%- @talks.each do |left| -%>
<%= CSV.generate_line([[left.title, left.id].join(' ')] + @talks.map { |right| left.id == right.id ? '-' : ConflictCoefficient.new(left.id, right.id).per_cent}).html_safe -%>
<%- end -%>