<link rel"stylesheet" type="text/css" href="application.css">


<link rel"stylesheet" type="text/css" href="application.css">

<h1>Election 2016</h1>
<h3>Hello <%= current_user.first_name%> <%= current_user.last_name %>!</h3>

<ul>
  <li> Email: <%= current_user.email %> </li>
  <li> Birthday: <%= current_user.birthday %> </li>
  <li> Sex: <%= current_user.gender %> </li>
  <li> Password: <%= current_user.password %> </li>
</ul>






<h1>Voting Record of <%= current_user.first_name %> <%= current_user.last_name %> </h1>

<table>
	<thead>
		<th>Position</th>
		<th>Voted Candidate</th>
	</thead>
	<tbody>
		<% Position.all.each do |p| %>
			<tr>
				<td>
					<%= p.name %>
				</td>
				<td>
					<% current_user.votes.each do |v| %>
						<% Candidate.all.each do |a| %>
							<% if a.id == v.candidate_id %>
								<% a.first_name %>
							<% else %>
								<h5> none </h5> 
							<% end %>
						<% end %>
					<% end %>
				</td>
			</tr>
		<% end %>
	</tbody>
</table>

      <%= link_to("Back to Home", root_path) %>