Getting at least one tournament working!

This commit is contained in:
Dan Buch
2012-03-12 00:18:42 -04:00
parent 73cff897a3
commit d08362326d
10 changed files with 66 additions and 79 deletions

View File

@@ -1,10 +0,0 @@
<ul>
<% @mash_tournament.mashes.each do |mash| %>
<% 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 %>
</ul>
<%= link_to 'New!', :controller => 'mash_tournaments', :action => 'new' %>

View File

@@ -0,0 +1,11 @@
- @mash_tournament.rounds.reverse.each do |round|
%h2 Round #{round.number}
- round.mashes.each do |mash|
%ul
- if mash.map_a.present? && mash.map_b.present? && mash.winner.present?
%li
#{mash.map_a.name} vs. #{mash.map_b.name}, winner =
%strong #{mash.winner.name}
= link_to 'New!', :controller => 'mash_tournaments', :action => 'new'