Created a partial to DRY the aja voting method. Modified the voter class to
[selectricity-live] / app / views / election / _candidate_list.rhtml
index ca8a5cc4d9e0a940f593418db15d6390200fdef9..881c0a5fb84d466a08338d25326793fa9401e18c 100644 (file)
@@ -1,7 +1,7 @@
 <% %>
 <ul id="candidate_list">
   <% @election.candidates.each do |candidate| %>
-    <% @candidate = candidate %>
-      <%= render :partial => 'candidate_line' %>
+      <% @current_candidate = candidate %>
+      <%= render(:partial => 'candidate_line')%>
     <% end %>
 </ul>

Benjamin Mako Hill || Want to submit a patch?