about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBen Harris <ben@tilde.team>2022-01-31 14:30:39 -0500
committerBen Harris <ben@tilde.team>2022-01-31 14:30:39 -0500
commit7e80d41b5e6f03a747199598316edc4fdc1892d1 (patch)
tree33fd753c71f86c634f41f15d64769966efe42f2b
parentb483ff56c663e2d346df8f1f243100007c2c93c9 (diff)
don't show table when there are no players
-rw-r--r--app/views/players/index.html.erb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/views/players/index.html.erb b/app/views/players/index.html.erb
index a635ded..5ab8e81 100644
--- a/app/views/players/index.html.erb
+++ b/app/views/players/index.html.erb
@@ -2,6 +2,7 @@
 
 <h1>Players</h1>
 
+<% if @players.any? %>
 <div id="players">
   <table>
     <thead>
@@ -27,6 +28,7 @@
     </tbody>
   </table>
 </div>
+<% end %>
 
 <p><%= pluralize(@players.count, 'total player') %></p>