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

Version Path
effective_polls-0.7.3 app/views/effective/poll_results/results/_email.html.haml
effective_polls-0.7.2 app/views/effective/poll_results/results/_email.html.haml
effective_polls-0.7.1 app/views/effective/poll_results/results/_email.html.haml
effective_polls-0.7.0 app/views/effective/poll_results/results/_email.html.haml
effective_polls-0.6.2 app/views/effective/poll_results/results/_email.html.haml
effective_polls-0.6.1 app/views/effective/poll_results/results/_email.html.haml
effective_polls-0.6.0 app/views/effective/poll_results/results/_email.html.haml
effective_polls-0.5.6 app/views/effective/poll_results/results/_email.html.haml
effective_polls-0.5.5 app/views/effective/poll_results/results/_email.html.haml
effective_polls-0.5.4 app/views/effective/poll_results/results/_email.html.haml
effective_polls-0.5.3 app/views/effective/poll_results/results/_email.html.haml
effective_polls-0.5.2 app/views/effective/poll_results/results/_email.html.haml
effective_polls-0.5.1 app/views/effective/poll_results/results/_email.html.haml
effective_polls-0.5.0 app/views/effective/poll_results/results/_email.html.haml
effective_polls-0.4.1 app/views/effective/poll_results/results/_email.html.haml
effective_polls-0.4.0 app/views/effective/poll_results/results/_email.html.haml
effective_polls-0.3.0 app/views/effective/poll_results/results/_email.html.haml
effective_polls-0.2.0 app/views/effective/poll_results/results/_email.html.haml
effective_polls-0.1.6 app/views/effective/poll_results/results/_email.html.haml
effective_polls-0.1.5 app/views/effective/poll_results/results/_email.html.haml