diff options
Diffstat (limited to 'railties/lib/rails_generator')
-rw-r--r-- | railties/lib/rails_generator/generators/components/scaffold/templates/view_edit.html.erb | 6 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/components/scaffold/templates/view_new.html.erb | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/railties/lib/rails_generator/generators/components/scaffold/templates/view_edit.html.erb b/railties/lib/rails_generator/generators/components/scaffold/templates/view_edit.html.erb index 73b200ba63..35eae462c6 100644 --- a/railties/lib/rails_generator/generators/components/scaffold/templates/view_edit.html.erb +++ b/railties/lib/rails_generator/generators/components/scaffold/templates/view_edit.html.erb @@ -1,8 +1,8 @@ <h1>Editing <%= singular_name %></h1> -<%%= error_messages_for :<%= singular_name %> %> - <%% form_for(@<%= singular_name %>) do |f| %> + <%%= f.error_messages %> + <% for attribute in attributes -%> <p> <%%= f.label :<%= attribute.name %> %><br /> @@ -15,4 +15,4 @@ <%% end %> <%%= link_to 'Show', @<%= singular_name %> %> | -<%%= link_to 'Back', <%= plural_name %>_path %> +<%%= link_to 'Back', <%= plural_name %>_path %>
\ No newline at end of file diff --git a/railties/lib/rails_generator/generators/components/scaffold/templates/view_new.html.erb b/railties/lib/rails_generator/generators/components/scaffold/templates/view_new.html.erb index e5de92222d..bc1f08abef 100644 --- a/railties/lib/rails_generator/generators/components/scaffold/templates/view_new.html.erb +++ b/railties/lib/rails_generator/generators/components/scaffold/templates/view_new.html.erb @@ -1,8 +1,8 @@ <h1>New <%= singular_name %></h1> -<%%= error_messages_for :<%= singular_name %> %> - <%% form_for(@<%= singular_name %>) do |f| %> + <%%= f.error_messages %> + <% for attribute in attributes -%> <p> <%%= f.label :<%= attribute.name %> %><br /> @@ -14,4 +14,4 @@ </p> <%% end %> -<%%= link_to 'Back', <%= plural_name %>_path %> +<%%= link_to 'Back', <%= plural_name %>_path %>
\ No newline at end of file |