]> projects.mako.cc - selectricity/blob - app/views/quickvote/_result.rhtml
Fix a bug where quickvote displays name cant be blank twice. validators are inherited...
[selectricity] / app / views / quickvote / _result.rhtml
1 <% %>
2 <% if result.winner? and result.winners.length == 1%>
3   <p><em>The winner is:
4      <strong><%=h @candidates[result.winner].name.capitalize %></strong></em></p>
5 <% elsif result.winner? and result.winners.length > 1 %>
6   <p><em>There was a tie. The winners are: <strong><%=h( result.winners.collect {|w| @candidates[w].to_s.capitalize}.join(", ") )%></strong></em></p>
7 <% else %>
8   <p><em>There is no winner using this method. </em></strong></p>
9 <% end %>

Benjamin Mako Hill || Want to submit a patch?