   require(paths.entryPath + "/controllers/#{controllerName}_controller")
 
 # this is the method that renders the request
-getHandler = (action) ->
+getHandler = (action, routeInfo) ->
   (req, res, next) ->
     context =
       app: req.rendrApp

        req: req
      res.render template, viewData, (err, html) ->
        return handleErr(err, req, res) if err
        res.type('html').end(html)
        utils.stashPerf(req, "render", new Date - start)

##
# Handle an error that happens while executing an action.

  routeSpecs = []
  for own path, routeInfo of routes
    action = getAction(routeInfo)
    handler = getHandler(action, routeInfo)
    routeSpecs.push(['get', "/#{path}", routeInfo.role, handler])

  routeSpecs
