<% if @tournaments.size > 0 %>

My Tournaments

<% end %> <% @tournaments.each do |tournament| %> <% if can? :manage, tournament %> <% end %> <% end %>
Name Date <% if user_signed_in? %><%= link_to ' New Tournament', new_tournament_path, :class=>"fas fa-plus" %>
<%= link_to "#{tournament.name}", tournament %> <%= tournament.date %> <%= link_to '', edit_tournament_path(tournament), :class=>"fas fa-edit" %> <% if can? :destroy, tournament %> <%= link_to '', tournament, method: :delete, data: { confirm: "Are you sure you want to delete #{tournament.name}?" }, :class=>"fas fa-trash-alt" %> <% end %>

<% end %> <% if @schools.size > 0 %>

My Schools

<% @schools.each do |school| %> <% end %>
Name Tournament Name Tournament Date
<%= link_to "#{school.name}", school %> <%= school.tournament.name %> <%= school.tournament.date %>
<% end %>