Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

39 lines (27 sloc) 0.943 kB
var <%= names.constructor.plural %> = function () {
this.respondsWith = ['html', 'json', 'xml', 'js', 'txt'];
this.index = function (req, resp, params) {
this.respond({params: params});
};
this.add = function (req, resp, params) {
this.respond({params: params});
};
this.create = function (req, resp, params) {
// Save the resource, then display index page
this.redirect({controller: this.name});
};
this.show = function (req, resp, params) {
this.respond({params: params});
};
this.edit = function (req, resp, params) {
this.respond({params: params});
};
this.update = function (req, resp, params) {
// Save the resource, then display the item page
this.redirect({controller: this.name, id: params.id});
};
this.remove = function (req, resp, params) {
this.respond({params: params});
};
};
exports.<%= names.constructor.plural %> = <%= names.constructor.plural %>;
Jump to Line
Something went wrong with that request. Please try again.