a bit of trivial defensive templating

This commit is contained in:
Dan Buch 2012-03-11 12:23:05 -04:00
parent 0b853163bf
commit dd06034974

View File

@ -1,6 +1,8 @@
<ul> <ul>
<% @mash_tournament.mashes.each do |mash| %> <% @mash_tournament.mashes.each do |mash| %>
<li><%= mash.map_a.name %> vs. <%= mash.map_b.name %>, winner = <%= mash.winner.name %></li> <% if mash.map_a.present? && mash.map_b.present? && mash.winner.present? %>
<li><%= mash.map_a.name %> vs. <%= mash.map_b.name %>, winner = <%= mash.winner.name %></li>
<% end %>
<% end %> <% end %>
</ul> </ul>