couchrest_model/lib/couchrest/helper/app-template/forms/example-form.js

17 lines
333 B
JavaScript
Raw Normal View History

2009-01-01 22:29:39 -08:00
function(doc, req) {
2009-01-02 01:59:33 -08:00
// !include lib.templates
// !require lib.helpers.template
2009-01-01 22:29:39 -08:00
respondWith(req, {
html : function() {
2009-01-02 01:59:33 -08:00
var html = template(lib.templates.example, doc);
2009-01-01 22:29:39 -08:00
return {body:html}
},
xml : function() {
return {
body : <xml><node value={doc.title}/></xml>
}
}
})
};