Sha256: ab5d86b9373e15b1b7f59d5ecbac3706fcd85520540ee099fd0507a985b0815a
Contents?: true
Size: 639 Bytes
Versions: 27
Compression:
Stored size: 639 Bytes
Contents
- sorted = ballot_responses.sort { |a, b| (a.date || Time.zone.now.end_of_year) <=> (b.date || Time.zone.now.end_of_year) } - sorted.group_by { |br| br.response }.each do |response, responses| - count = responses.length - total = ballot_responses.length - percent = (total.zero? ? 0 : ((count * 100.0) / total).round) .poll-result-option .d-flex .mr-auto= response.blank? ? 'None of the Above' : response.strftime('%F') .text-muted #{count} (#{percent}%) .progress.mb-3 .progress-bar{role: 'progressbar', 'aria-valuenow': count, 'aria-valuemin': 0, 'aria-valuemax': total, style: "width: #{percent}%"}
Version data entries
27 entries across 27 versions & 1 rubygems