function(head, req) { provides("html", function() { var header = '

Listing <%= pluralized_model_name.humanize %>

'; header += '

New <%= model_name.humanize %>

'; header += ''; <% attributes.each do |attribute| -%> header += ''; <% end -%> header += ''; header += ''; send(header); var row; while (row = getRow()) { var body = ''; <% attributes.each do |attribute| -%> body += ''; <% end -%> body += ''; body += ''; send(body); } var tail = '
<%= attribute.humanize %>
' + row.value['<%= attribute %>'] + 'Show
'; return tail; }); }