X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/560828ebdd364de4ca09d61764f19215a9e29e59..dc7d60a0de460c72d292b43616eb97a8b34741c8:/app/views/elections/_winner.rhtml diff --git a/app/views/elections/_winner.rhtml b/app/views/elections/_winner.rhtml new file mode 100644 index 0000000..531e0d2 --- /dev/null +++ b/app/views/elections/_winner.rhtml @@ -0,0 +1,21 @@ +<% %> + +<% if @winners.length > 1 %> +

There were multiple winners for the election. The winners (tied) + were: + +

+ +<% else %> + + <% winner = @winners[0] %> +

The winner of the election was: + <%= @candidates_by_id[winner].name %> +

+ +<% end %> +