Commit b94b5fd2 authored by Paulo Macasaet's avatar Paulo Macasaet

included comments in admin/candidates/show. Macasaet

parent 0d5f29ad
<h1><%= @candidate.nickname %></h1> <h1><%= @candidate.nickname %></h1>
<br> <br>
<%= link_to "Back to List", admin_candidates_path %>
<ul> <ul>
<li><%= @candidate.first_name %></li> <li><%= @candidate.first_name %></li>
<li><%= @candidate.last_name %></li> <li><%= @candidate.last_name %></li>
...@@ -9,4 +11,11 @@ ...@@ -9,4 +11,11 @@
</ul> </ul>
<hr> <hr>
<%= link_to "Back to List", admin_candidates_path %> <h2>Comments by Voters for <%= @candidate.last_name %>:</h2>
<% @candidate.votes.each do |x| %>
<!-- Paulo Macasaet Item number 3 -->
<li>Name: <strong><%= x.user.email %> || ID: <%= x.user_id %></strong></li>
<li>Comments: <strong><%= x.comments %></strong></li>
<% end %>
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