Created a partial to DRY the aja voting method. Modified the voter class to
[selectricity-live] / app / views / voter / review.rhtml
1 <% %>
2
3 <% %>
4 <h1>Please review your vote carefully before confirming it.</h1>
5
6 <p>You have ranked the candidates in the following order (from most
7 preferred to least preferred:</p>
8
9 <ol>
10   <% for rank in @voter.vote.rankings.sort %>
11   <li><%=h rank.candidate.name.capitalize %> </li>
12   <% end %>
13 </ol>
14
15 <table>
16 <tr>
17   <td valign="top"><%= button_to 'Confirm', :action => 'confirm', :id => @voter.password %></td>
18   <td valign="top">Confirm this vote now. You will be able to go back and
19     change it.</td>
20 </tr>
21
22 <tr>
23   <td valign="top"><%= button_to 'Change', :action => 'index', :id => @voter.password %></td>
24   <td valign="top">Go back to the voting page and vote again.</td>
25 </tr>
26
27 <tr>
28   <td valign="top"><%= button_to 'Discard', :action => 'discard' %></td>
29   <td valign="top">Discard this tentative vote and log out.</td>
30 </tr>
31
32 </table>

Benjamin Mako Hill || Want to submit a patch?