Skip to content

Commit

Permalink
made flashes optional
Browse files Browse the repository at this point in the history
  • Loading branch information
mattinsler committed Aug 8, 2013
1 parent 0a2d569 commit 3ad8a37
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/controller/controller.coffee
Expand Up @@ -10,8 +10,8 @@ class Controller
Object.defineProperty(@, '_responder', {writable: true, value: new Responder(req, res, next)})

@flash = @session?.flash
@flash = req.flash() if !@flash? or @flash is {}
delete @session.flash
@flash = req.flash() if req.flash? and !@flash? or @flash is {}
delete @session?.flash

@respond_with.callback = (err, data) =>
@respond_with(err ? data)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -2,7 +2,7 @@
"author": "Matt Insler <matt.insler@gmail.com> (www.mattinsler.com)",
"name": "caboose",
"description": "Rails-ish MVC Framework in Coffeescript",
"version": "0.1.64",
"version": "0.1.65",
"repository": {
"type": "git",
"url": "git@github.com:mattinsler/caboose.git"
Expand Down

0 comments on commit 3ad8a37

Please sign in to comment.