Sha256: 95e88d32adb8aed1cecd033a7fd563528d8336fd3037714489423d6da27e71c3
Contents?: true
Size: 716 Bytes
Versions: 5
Compression:
Stored size: 716 Bytes
Contents
<table class="answers-statistics"> <% question.options.each do |option| %> <tr> <td> <%= option.text %> <% question.answers.by(current_user).each do |answer| %> <% answer.votes.each do |vote| %> <%= '*' if vote.option == option %> <% end %> <% end %> </td> <% percentage = ( 100 / question.votes.count ) * option.votes.count %> <td class="percentage-bar-container"> <span style="width: <%= percentage %>%;"> <%= percentage %>% (<%= option.votes.count %>) </span> </td> <td> <% if option.correct? %> ✔ <% end %> </td> </tr> <% end %> </table>
Version data entries
5 entries across 5 versions & 1 rubygems