Created
May 31, 2012 00:12
-
-
Save larzconwell/2839732 to your computer and use it in GitHub Desktop.
This file contains 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
Main = -> | |
this.index = (req, res, params) -> | |
this.respond params, | |
format: 'html' | |
template: 'app/views/main/index' | |
exports.Main = Main | |
### | |
# Compiled JS output | |
var Main = function() { | |
return this.index = function(req, res, params) { | |
return this.respond(params, { | |
format: 'html', | |
template: 'app/views/main/index' | |
}); | |
}; | |
}; | |
exports.Main = Main; | |
### | |
### | |
# Working JS alternative | |
var Main = function () { | |
this.index = function (req, resp, params) { | |
this.respond(params, { | |
format: 'html' | |
, template: 'app/views/main/index' | |
}); | |
}; | |
}; | |
exports.Main = Main; | |
### |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment