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

<h1>Ballot</h1>

<% @candidates.each do |position_id, candidates| %>
<%= simple_form_for(@vote, url: confirm_vote_path, method: :post) do |o| %>
		
			<%= Position.find(position_id).name %>
				<ul> 
					<li><%= o.association :candidate, :collection => candidates %></li>
					<li><%= o.input :comments %></li>
				</ul>
				
				<%= o.button :submit, "Vote" %>
		<% end %>
		<%= link_to "Back", candidates_list_path %>
		
<% end %>