Skip to content

Instantly share code, notes, and snippets.

@pengwynn
Created June 13, 2011 22:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pengwynn/1023859 to your computer and use it in GitHub Desktop.
Save pengwynn/1023859 to your computer and use it in GitHub Desktop.
dataForSubmit: () ->
players_data = _.map @players, (player, email) ->
player =
tee_slug: player.tee
email: email
handicap: player.handicap
holes: _.map player.scores, (score, hole) ->
hole_data =
hole: hole.replace("h", "")
score: score
data =
# course_slug: @course.slug
competition: "My competition"
players: players_data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment