ruby-ejs
ruby-ejs copied to clipboard
Added "subtemplating" for lack of a better work
The following changes allow the following:
Giving this function
formTag = function (template) {
return '<form>\n'+template()+'\n</form>';
}
The following ejs template:
<%= formTag(function () { %>
<input type="submit" />
<% }) %>
generates:
<form>
<input type="submit" />
</form>