%h1 Listing games

.button= link_to 'New Game', new_game_path

.games-container
  - @games.each do |game|
    .game
      .title= link_to game.title, game
      .player-count= "#{game.players.count} Players"

      - if policy(game).update?
        .owner-controls
          = link_to 'Edit', edit_game_path(game)
          = link_to 'Destroy', game, :method => :delete, :data => { :confirm => 'Are you sure?' }

