Modified show.html.erb for candidate views

parent 5e8443b6
...@@ -7,4 +7,13 @@ ...@@ -7,4 +7,13 @@
<li>Female Voters: <%= @votes_female.size %></li> <li>Female Voters: <%= @votes_female.size %></li>
</ul> </ul>
<h2>People who voted for <%= @candidate.first_name %> <%= @candidate.last_name %>:</h2>
<ul>
<li>User - Comment</li>
<% @votes.each do |v| %>
<li>
<%= v.user.email %> - <%= v.comment %>
</li>
<% end %>
</ul>
<%= link_to "Back to Candidates", admin_candidates_path %> <%= link_to "Back to Candidates", admin_candidates_path %>
\ No newline at end of file
<h2>Candidate: <%= @candidate.first_name %> <%= @candidate.last_name %> </h2>
<h4>Party List: <%= @candidate.party_list.name %></h4>
<h3><%= @candidate.last_name %>'s Slogan: <%= @candidate.slogan %></h3>
<ul>
<li>Votes: <%= @votes_male.size + @votes_female.size %></li>
<li>Male Voters: <%= @votes_male.size %></li>
<li>Female Voters: <%= @votes_female.size %></li>
</ul>
<h2>People who voted for <%= @candidate.first_name %> <%= @candidate.last_name %>:</h2>
<ul>
<li>User - Comment</li>
<% @votes.each do |v| %>
<li>
<%= v.user.email %> - <%= v.comment %>
</li>
<% end %>
</ul>
<%= link_to "Back to Candidates", admin_candidates_path %>
\ No newline at end of file
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