Variety of small changes (mostly to properties) plus a few "in the
[selectricity] / app / views / election / edit_candidates.rhtml
1 <h1>Edit/Add Candidates</h1>
2
3 <%= error_messages_for :candidate %>
4
5 <% unless @election.candidates.empty? %>
6   <p>The following are valid options or candidates in this election:</p>
7
8   <% @election.candidates.each do |candidate| %>
9     <% @current_candidate = candidate %>
10     <%= render :partial => 'candidate_line_edit' %>
11   <% end %>
12
13 <% else %>
14   <p>There are no candidates registered for this election.</p>
15 <% end %>
16
17 <p>Please enter new candidates below.</p>
18
19 <%= form_tag( { :action => :add_candidate, :id => @election.id },
20               :multipart => true ) %>
21 <%= render :partial => 'candidate_form' %>
22 <%= submit_tag "Add Candidate" %>
23 <%= end_form_tag %>
24
25 <%= button_to "Done!", :action => 'show', :id => @election %>

Benjamin Mako Hill || Want to submit a patch?