X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/75091532075247ae9c47164ea883f4fe803eddf4..04f827dd4647f3a7d6e5bd8f5e9083c730a8dccc:/app/views/quickvote/_result.rhtml diff --git a/app/views/quickvote/_result.rhtml b/app/views/quickvote/_result.rhtml new file mode 100644 index 0000000..a326459 --- /dev/null +++ b/app/views/quickvote/_result.rhtml @@ -0,0 +1,10 @@ +<% %> +<% if result.winner? and result.winners.length == 1%> +

The winner is: + <%= @candidates[result.winner].name %>

+<% elsif result.winner? and result.winners.length > 1 %> +

There was a tie. The winners are: <%= + result.winners.collect {|w| @candidates[w]}.join(", ") %>

+<% else %> +

There is no winner using this method.

+<% end %>