From 80cd16372ce1776e5d6af87b2dc7be8205fa1513 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Wed, 1 Jul 2009 18:33:22 +0200 Subject: Added scaffold views to scaffold controller. --- .../generators/erb/scaffold/templates/edit.html.erb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 railties/lib/generators/erb/scaffold/templates/edit.html.erb (limited to 'railties/lib/generators/erb/scaffold/templates/edit.html.erb') 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 @@ +

Editing <%= singular_name %>

+ +<%% form_for(@<%= singular_name %>) do |f| %> + <%%= f.error_messages %> + +<% for attribute in attributes -%> +

+ <%%= f.label :<%= attribute.name %> %>
+ <%%= f.<%= attribute.field_type %> :<%= attribute.name %> %> +

+<% end -%> +

+ <%%= f.submit 'Update' %> +

+<%% end %> + +<%%= link_to 'Show', @<%= singular_name %> %> | +<%%= link_to 'Back', <%= plural_name %>_path %> \ No newline at end of file -- cgit v1.2.3