% cache ["#{@tournament.id}_all_brackets", @tournament] do %>
| <% @matches = @tournament.matches.select{|m| m.weight_id == weight.id} %> <% @wrestlers = Wrestler.where(weight_id: weight.id) %> <% @pools = weight.pool_rounds(@matches) %> <% @weight = weight %> <%= render 'bracket_partial' %> | <% elsif @tournament.tournament_type == "Modified 16 Man Double Elimination" or @tournament.tournament_type == "Double Elimination 1-6" %><% @matches = weight.matches %> <% @weight = weight %> <%= render 'bracket_partial' %> | <% end %>