<% 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 %>