diff options
Diffstat (limited to 'railties/lib/generators/erb/scaffold/templates/new.html.erb')
-rw-r--r-- | railties/lib/generators/erb/scaffold/templates/new.html.erb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/railties/lib/generators/erb/scaffold/templates/new.html.erb b/railties/lib/generators/erb/scaffold/templates/new.html.erb new file mode 100644 index 0000000000..96c89fc50e --- /dev/null +++ b/railties/lib/generators/erb/scaffold/templates/new.html.erb @@ -0,0 +1,17 @@ +<h1>New <%= 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 'Create' %> + </p> +<%% end %> + +<%%= link_to 'Back', <%= plural_name %>_path %>
\ No newline at end of file |