Extract legacy parts of the codebase into its own module

This commit is contained in:
Liam Morley 2021-11-15 16:07:15 -05:00 committed by rebuilt
parent cf6e80ce6b
commit 413096dfe2
269 changed files with 5549 additions and 5279 deletions

View file

@ -1,12 +0,0 @@
- histogram = data.responses.map(&:answer_index_with_reverse).group_by { |a| a.to_s }
%table.answers
%tbody
- data.question.options_with_reverse.each_with_index do |option, index|
%tr.answer
- group = histogram[(index + 1).to_s]
- width = (100 * (group.blank? ? 0 : group.length)) / histogram.values.flatten.length
%td.text
= "#{option}:"
= group.blank? ? 0 : group.length
%td.count
%div{class: "bar#{index}", style: "width: #{width}%"}