title: nodejs View not rending in Layout
body: <p>I am trying to create a simple layout using CoffeeScript, NodeJS and expressJS. My Coffee script is</p>
  
  <p><strong>routes.coffee</strong> I have renamed routes folder to apps and my routes.coffee file is in there in authentication folder i.e. <code>apps\authentication\routes.coffee</code></p>
  
  <pre><code>routes = (app) -&gt;
    app.get "/login", (req , res) -&gt;
      res.render "#{__dirname}/views/login",
        title: 'Login',
        stylesheet: 'login'
  module.exports = routes
  </code></pre>
  
  <p><strong>Login View</strong> I have renamed routes folder to apps and my login view in there in authentication folder i.e. <code>apps\authentication\views\login.jade</code></p>
  
  <pre><code>extends ../../../views/layout
  
  block content
  form(action='/sessions', method='post')
      label
          | Username
          input(type='text', name='user')
      label
          | Password
          input(type='password', name='password')
      input(type='submit', name='Submit')
  </code></pre>
  
  <p><strong>Layout.jade</strong> This file is in default views folder. I am using default layout</p>
  
  <pre><code>doctype
  html
    head
      title= title
    body
      #content
        h1= title
        block content
  
      != body
  </code></pre>
  
  <p><strong>app.js</strong></p>
  
  <pre><code>require('coffee-script').register();
  var express = require('express');
  var path = require('path');
  var favicon = require('serve-favicon');
  var logger = require('morgan');
  var cookieParser = require('cookie-parser');
  var bodyParser = require('body-parser');
  
  //var index = require('./routes/index');
  //var users = require('./routes/users');
  
  var app = express();
  
  // view engine setup
  // app.set('views', path.join(__dirname, 'views'));
  app.set('view engine', 'jade');
  // app.set('view options', { layout: 'views/layout' });
  // uncomment after placing your favicon in /public
  app.use(favicon(path.join(__dirname, '/public', 'favicon.ico')));
  app.use(logger('dev'));
  app.use(bodyParser.json());
  app.use(bodyParser.urlencoded({ extended: false }));
  app.use(cookieParser());
  app.use(express.static(path.join(__dirname, '/public')));
  // app.use(express.static('public'));
  app.set('view options', {  
    layout: false
  });
  //app.use('/', index);
  //app.use('/users', users);
  
  require('./apps/authentication/routes')(app);
  
  // catch 404 and forward to error handler
  app.use(function(req, res, next) {
    var err = new Error('Not Found');
    err.status = 404;
    next(err);
  });
  
  // error handler
  app.use(function(err, req, res, next) {
    // set locals, only providing error in development
    res.locals.message = err.message;
    res.locals.error = req.app.get('env') === 'development' ? err : {};
  
    // render the error page
    res.status(err.status || 500);
    res.render('error');
  });
  
  module.exports = app;
  </code></pre>
  
  <p>I have created two variables <code>title</code> and <code>stylesheet</code> in <code>routes.coffee</code> however, when i try to implement those variables at <code>layout.jade</code> i.e. title, i get <code>undefined</code> as title in heading.</p>
  
  <p>Can anyone help please?</p>
  
  <p>Thanks.</p>