Created
February 3, 2011 16:13
-
-
Save ToJans/809695 to your computer and use it in GitHub Desktop.
What am i doing wrong here ?
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
ReferenceError: session is not defined | |
at Object.<anonymous> (eval at <anonymous> (/usr/local/lib/node/.npm/coffeekup/0.2.2/package/lib/coffeekup.js:186:12)) | |
at anonymous (eval at <anonymous> (/usr/local/lib/node/.npm/coffeekup/0.2.2/package/lib/coffeekup.js:186:12)) | |
at Object.render (/usr/local/lib/node/.npm/coffeekup/0.2.2/package/lib/coffeekup.js:206:12) | |
at Object.render (/usr/local/lib/node/.npm/zappa/0.1.4/package/lib/zappa.coffee:472:26) | |
at Object.<anonymous> (eval at <anonymous> (/usr/local/lib/node/.npm/zappa/0.1.4/package/lib/zappa.coffee:626:12)) | |
at RequestHandler.anonymous [as handler] (eval at <anonymous> (/usr/local/lib/node/.npm/zappa/0.1.4/package/lib/zappa.coffee:626:12)) | |
at RequestHandler.execute (/usr/local/lib/node/.npm/zappa/0.1.4/package/lib/zappa.coffee:443:21) | |
at Object.<anonymous> (/usr/local/lib/node/.npm/zappa/0.1.4/package/lib/zappa.coffee:250:26) | |
at param (/usr/local/lib/node/.npm/connect/0.5.6/package/lib/connect/middleware/router.js:147:21) | |
at pass (/usr/local/lib/node/.npm/connect/0.5.6/package/lib/connect/middleware/router.js:163:10) |
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
get '/': -> redirect 'index' | |
get '/index': -> | |
render 'index' | |
put '/index': -> | |
session.tasks ?= [] | |
session.tasks[session.tasks.length]=@subject | |
redirect 'index' | |
layout -> | |
head -> title 'todolist-zappa' | |
body -> @content | |
view index: -> | |
h1 'Todo-list Zappa' | |
if session.tasks? | |
ul -> | |
for l in session.tasks | |
li l | |
form -> | |
input type:'text', name:'subject' | |
input type:'submit' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment