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

tweak

parent b2a4d135
...@@ -190,4 +190,4 @@ DEPENDENCIES ...@@ -190,4 +190,4 @@ DEPENDENCIES
web-console web-console
BUNDLED WITH BUNDLED WITH
1.10.4 1.12.5
...@@ -18,8 +18,8 @@ class Candidate < ApplicationRecord ...@@ -18,8 +18,8 @@ class Candidate < ApplicationRecord
votes.select { |vote| vote.user.gender == 'Female' } votes.select { |vote| vote.user.gender == 'Female' }
end end
def others_votes def other_votes
votes.select { |vote| vote.user.gender == 'Others' } votes.select { |vote| vote.user.gender == 'Other' }
end end
end end
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<tr> <tr>
<td><center> <%= @candidate.male_votes.size %> Votes <br> <progress value="<%= @candidate.male_votes.size %>" max="<%= @candidate.votes.count %>" ></center></td> <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.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> <td><center><%= @candidate.votes.count %></center></td>
</tr> </tr>
</table> </table>
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<ul> <ul>
<li> <li>
<% @candidate.votes.each do |v|%> <% @candidate.votes.each do |v|%>
<%= "#{v.user_id}"%> Voter ID: <%= "#{v.user_id}"%>
<br> <br>
<p> <p>
Comments: <%=v.comment%> 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