mauricemach/zappa — Issue #101: Unable to include files in templates
Author: pikeas
Created: 2011-10-09 19:22:06+00:00
State: open

Include directives in templates aren't working.

require('zappa') ->

@use 'bodyParser', 'methodOverride', @app.router, 'static','cookieParser', session: {secret: 'fnord'}, 'cookies'
@set 'view engine': 'jade', views: "#{__dirname}/views"

@get '/': -> @render 'index'

@view index: '''
include header
p Blah blah blah
'''

This fails with a bad file descriptor error on console. The following also fail: "include header.jade", "include views/header", "include views/header.jade". The same thing happens when trying to use an include statement in a template on disk (eg, in layout.jade).