Skip to content
Permalink
Browse files

Update scores.coffee

  • Loading branch information...
Abdulwahaab710 committed Apr 7, 2019
1 parent 5b6e9fa commit dcc0685f8cbe444c43388313fe12b05440f44b79
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/assets/javascripts/scores.coffee
@@ -5,11 +5,11 @@ App.room = App.cable.subscriptions.create "ScoresChannel",
received: (data) ->
$('table#leaderboard tbody').children().remove()
cnt = 0
$('.scores').append('<tr><td>Place</td><td>Team name</td><td>Score</td></tr>')
$('table#leaderboard tbody').append('<tr><td>Place</td><td>Team name</td><td>Score</td></tr>')
for team in JSON.parse(data['message'])
cnt++
console.log "#{team[0]} - #{team[1]}"
$('.scores').append($("<tr/>").html([
$('table#leaderboard tbody').append($("<tr/>").html([
$("<td/>").text(cnt),
$("<td/>").text(team[0]),
$("<td/>").text(team[1])

0 comments on commit dcc0685

Please sign in to comment.
You can’t perform that action at this time.