Sha256: fec1d350117627554af6a429a062bcd7881c4f62de287efff13adc42e98d109c
Contents?: true
Size: 580 Bytes
Versions: 27
Compression:
Stored size: 580 Bytes
Contents
- sorted = ballot_responses.sort { |a, b| (a.email || '') <=> (b.email || '') } - 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 .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