Commit 0f4f790b authored by Justin Bala's avatar Justin Bala

tweak

parent b2a4d135
......@@ -190,4 +190,4 @@ DEPENDENCIES
web-console
BUNDLED WITH
1.10.4
1.12.5
......@@ -18,8 +18,8 @@ class Candidate < ApplicationRecord
votes.select { |vote| vote.user.gender == 'Female' }
end
def others_votes
votes.select { |vote| vote.user.gender == 'Others' }
def other_votes
votes.select { |vote| vote.user.gender == 'Other' }
end
end
......@@ -40,7 +40,7 @@
<tr>
<td><center> <%= @candidate.male_votes.size %> Votes <br> <progress value="<%= @candidate.male_votes.size %>" max="<%= @candidate.votes.count %>" ></center></td>
<td><center> <%= @candidate.female_votes.size %> Votes <br> <progress value="<%= @candidate.female_votes.size %>" max="<%= @candidate.votes.count %>" ></center></td>
<td><center><%= @candidate.others_votes.size %> Votes <br> <progress value="<%= @candidate.others_votes.size %>" max="<%= @candidate.votes.count %>" ></center></td>
<td><center><%= @candidate.other_votes.size %> Votes <br> <progress value="<%= @candidate.other_votes.size %>" max="<%= @candidate.votes.count %>" ></center></td>
<td><center><%= @candidate.votes.count %></center></td>
</tr>
</table>
......@@ -51,7 +51,7 @@
<ul>
<li>
<% @candidate.votes.each do |v|%>
<%= "#{v.user_id}"%>
Voter ID: <%= "#{v.user_id}"%>
<br>
<p>
Comments: <%=v.comment%>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment