Created
August 19, 2013 03:15
-
-
Save jimsynz/6265492 to your computer and use it in GitHub Desktop.
Does anyone have any ideas how to make promises look nicer in CoffeeScript?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
registerNewUser: -> | |
@session.flush().then(((models)=> | |
newUser = @get('content') | |
@transitionToRoute('user', newUser) | |
), ((response)-> | |
console.log response | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You don't actually need the parens if you don't mind only having the comma to separate the functions (visually, it's less than optimal):