function(head, req) {
provides("html", function() {
var header = '
Listing <%= pluralized_model_name.humanize %>
';
header += 'New <%= model_name.humanize %>
';
header += '';
<% attributes.each do |attribute| -%>
header += '<%= attribute.humanize %> | ';
<% end -%>
header += ' | ';
header += '
';
send(header);
var row;
while (row = getRow()) {
var body = '';
<% attributes.each do |attribute| -%>
body += '' + row.value['<%= attribute %>'] + ' | ';
<% end -%>
body += 'Show | ';
body += '
';
send(body);
}
var tail = '
';
return tail;
});
}