   context.include = (p) ->
     sub = if typeof p is 'string' then require path.join(context.root, p) else p
     sub.include.apply(context, [context])
+
+  apply_helpers = (ctx) ->
+    for name, helper of helpers
+      do (name, helper) ->
+        if typeof helper is 'function'
+          ctx[name] = (args...) ->
+            args.push ctx
+            helper.apply ctx, args
+        else
+          ctx[name] = helper
+    ctx
 
   # Register a route with express.
   route = (r) ->

              socket.broadcast.to(room).emit.apply socket.broadcast, [k, v]
              socket.emit.apply socket, [k, v]

      for name, helper of helpers
        do (name, helper) ->
          ctx[name] = ->
            helper.apply(ctx, arguments)
      ctx

    ctx = build_ctx()

            # Just forward params to express.
            res.render.apply res, args

        apply_helpers ctx

        if app.settings['databag']
          data = {}
