X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/538c52ea43285fc1ae40e3c3ff5ee78befa1c142..da6c29f53b3598a6d2d9959df277b0340bc54cee:/app/views/common/_result.rhtml diff --git a/app/views/common/_result.rhtml b/app/views/common/_result.rhtml new file mode 100644 index 0000000..b0a3a85 --- /dev/null +++ b/app/views/common/_result.rhtml @@ -0,0 +1,12 @@ +
+

+<% if result.winner? and result.winners.length == 1 -%> + The winner is: + <%=h @candidates[result.winner].name.capitalize %> +<% elsif result.winner? and result.winners.length > 1 %> + There was a tie. The winners are: <%=h( result.winners.collect {|w| @candidates[w].to_s.capitalize}.join(", ") )%> +<% else %> +

There is no winner using this method. +<% end %> +

+