added links to show for candidates

parent fe5b4aa6
<h1>Votes</h1>
<%= link_to "Vote Now!", new_vote_path %>
<table width="100%">
<tr>
<th>#</th>
<th>User ID</th>
<th>Candidate</th>
<th>Position</th>
</tr>
<% @votes.each do |vote| %>
<tr>
<td><%= link_to "#{vote.id}", vote_path(vote.id) %></td>
<td><%= vote.user_id %></td>
<td>
<%= vote.candidate.first_name %> "<%= vote.candidate.nickname %>" <%= vote.candidate.last_name %>
</td>
<td>
<%= vote.candidate.position.name %>
</td>
</tr>
<% end %>
</table>
\ 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