aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/generators/erb/scaffold/templates/edit.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/generators/erb/scaffold/templates/edit.html.erb')
-rw-r--r--railties/lib/generators/erb/scaffold/templates/edit.html.erb18
1 files changed, 18 insertions, 0 deletions
diff --git a/railties/lib/generators/erb/scaffold/templates/edit.html.erb b/railties/lib/generators/erb/scaffold/templates/edit.html.erb
new file mode 100644
index 0000000000..cca1d61c68
--- /dev/null
+++ b/railties/lib/generators/erb/scaffold/templates/edit.html.erb
@@ -0,0 +1,18 @@
+<h1>Editing <%= singular_name %></h1>
+
+<%% form_for(@<%= singular_name %>) do |f| %>
+ <%%= f.error_messages %>
+
+<% for attribute in attributes -%>
+ <p>
+ <%%= f.label :<%= attribute.name %> %><br />
+ <%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>
+ </p>
+<% end -%>
+ <p>
+ <%%= f.submit 'Update' %>
+ </p>
+<%% end %>
+
+<%%= link_to 'Show', @<%= singular_name %> %> |
+<%%= link_to 'Back', <%= plural_name %>_path %> \ No newline at end of file