lib/rid/generators/show/templates/form.mustache in rid-0.4.1 vs lib/rid/generators/show/templates/form.mustache in rid-0.5.0
- old
+ new
@@ -1,14 +1,22 @@
-<p><a href="{{path}}/_list/<%= pluralized_model_name %>/<%= pluralized_model_name %>">List <%= pluralized_model_name.humanize %></a></p>
+<p>
+ <a href="{{path}}/_list/<%= pluralized_model_name %>/<%= pluralized_model_name %>">List <%= pluralized_model_name.humanize %></a>
+{{#rev}}
+ | <a href="{{path}}/_show/<%= model_name %>/{{id}}">Show <%= model_name.humanize %></a>
+{{/rev}}
+</p>
<form action="{{path}}/_update/<%= pluralized_model_name %>" method="post" accept-charset="utf-8">
+{{#rev}}
+ <input type="hidden" name="rev" value="{{rev}}" id="rev" />
+{{/rev}}
<p>
<label for="id">ID</label><br/>
<input type="text" name="id" value="{{id}}" id="id" />
</p>
<% attributes.each do |attribute| -%>
<p>
<label for="<%= attribute %>"><%= attribute.humanize %></label><br/>
<input type="text" name="<%= attribute %>" value="{{<%= attribute %>}}" id="<%= attribute %>" />
</p>
<% end -%>
- <p><input type="submit" value="Create <%= model_name.humanize %>"></p>
+ <p><input type="submit" value="Save <%= model_name.humanize %>"></p>
</form>