1602/express-on-railway — Issue #89: Add model attributes to scaffolded templates
Author: bergie
Created: 2011-12-27 11:00:56+00:00
State: open

Currently when templates are scaffolded they are empty (except for some HTML snippets, and links to admin tools). It would be great if the scaffolding script could populate the properties given to the model automatically to the generated templates.

Even better, the properties could be annotated with RDFa so they would benefit from search engines understanding the contents, and would be easily editable with tools like [CreateJS](http://createjs.org/).

so, when running `railway generate crud post title content`, the contents of `app/views/posts/show.ejs` would be:

<%= post.title %>

<%= post.content %>

<%- link_to('Edit', path_to.edit_post(post), {class: 'btn primary'}) %>
<%- link_to('Delete', path_to.post(post), {class: 'btn danger', method: 'delete', remote: true, jsonp: '(function (u) { location.href = u; })'}) %>
or
<%- link_to('Back to index', path_to.posts) %>