Permalink
Browse files

add a shortcut @json to @response.json

  • Loading branch information...
imzshh authored and QaDeS committed Mar 1, 2012
1 parent 725e010 commit c632c903aeb25e0b07c5fdfe7d968bcde04731e1
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/zappa.coffee
View
@@ -258,6 +258,7 @@ zappa.app = (func) ->
session: req.session
response: res
next: next
+ json: -> res.json.apply res, arguments
send: -> res.send.apply res, arguments
redirect: -> res.redirect.apply res, arguments
render: ->
@@ -453,4 +454,4 @@ module.exports = zappa.run
module.exports.run = zappa.run
module.exports.app = zappa.app
module.exports.adapter = zappa.adapter
-module.exports.version = zappa.version
+module.exports.version = zappa.version

0 comments on commit c632c90

Please sign in to comment.