Browse files

docs

  • Loading branch information...
1 parent 4c316ba commit 6ae32fd596e344e0a79ccdf43d165f15276584b1 @tj tj committed Nov 24, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/application.js
View
2 lib/application.js
@@ -86,11 +86,13 @@ app.defaultConfiguration = function(){
this.use(connect.query());
this.use(middleware.init(this));
+ // app locals
this.locals = function(obj){
for (var key in obj) self.locals[key] = obj[key];
return self;
};
+ // response locals
this.locals.use = function(fn){
if (3 == fn.length) {
self.viewCallbacks.push(fn);

0 comments on commit 6ae32fd

Please sign in to comment.