Skip to content

Instantly share code, notes, and snippets.

@pengwynn
Created June 13, 2011 21:33
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/1023770 to your computer and use it in GitHub Desktop.
Save pengwynn/1023770 to your computer and use it in GitHub Desktop.
dataForSubmit: () ->
data =
# course_slug: @course.slug
competition: "My competition"
players: _.map @players, (player, email) ->
player =
tee_slug: player.tee # or whatever
email: email
handicap: player.handicap # or omit
holes: _.map player.scores, (score, hole) ->
hole: hole.replace("h", "")
score: score
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment