         return res.status(404).send(error: err.toString()) if err
         return res.status(404).send("Model not found with id: #{req.params.id}") unless json
         json = _.pick(json, @white_lists.show) if @white_lists.show
-        return res.json(json) unless @renderer
+        return res.json(json) unless @render
 
-        JSONUtils.renderModelJSON new @model_type(@model_type::parse(model_json)), @renderer, @render_options or {}, (err, json) =>
+        # TODO: intgrate the cache -> would need to be done as part of the fetch
+        @render req, json, (err, json) =>
           return res.status(500).send(error: err.toString()) if err
           res.json(json)
+
     catch err
       res.status(500).send(error: err.toString())
 

    @[key] = value for key, value of options
    @white_lists or= {}

    app.get "#{@route}/:id", @show
    app.get @route, @index

    app.post @route, @create
    app.put "#{@route}/:id", @update

    app.del "#{@route}/:id", @destroy
    app.del @route, @destroyByQuery

  index: (req, res) =>
    try

util = require 'util'
_ = require 'underscore'
Utils = require 'backbone-orm/lib/utils'

module.exports = class RESTController

