working quickvote support created
[selectricity-live] / app / views / quickvote / _result.rhtml
diff --git a/app/views/quickvote/_result.rhtml b/app/views/quickvote/_result.rhtml
new file mode 100644 (file)
index 0000000..a326459
--- /dev/null
@@ -0,0 +1,10 @@
+<% %>
+<% if result.winner? and result.winners.length == 1%>
+  <p><em>The winner is:
+     <strong><%= @candidates[result.winner].name %></strong></em></p>
+<% elsif result.winner? and result.winners.length > 1 %>
+  <p><em>There was a tie. The winners are: <strong><%=
+  result.winners.collect {|w| @candidates[w]}.join(", ") %></strong></em></p>
+<% else %>
+  <p><em>There is no winner using this method. </em></strong></p>
+<% end %>

Benjamin Mako Hill || Want to submit a patch?