couchrest_model/lib/couchrest/helper/template-app/forms/example-form.js
2009-01-02 01:59:33 -08:00

17 lines
No EOL
333 B
JavaScript

function(doc, req) {
// !include lib.templates
// !require lib.helpers.template
respondWith(req, {
html : function() {
var html = template(lib.templates.example, doc);
return {body:html}
},
xml : function() {
return {
body : <xml><node value={doc.title}/></xml>
}
}
})
};