From 3e556d3dbc714ad0c55142198bb0d832df7c895b Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 22 Mar 2008 04:47:53 +0000 Subject: Use the more modern error_messages from the form object rather than error_messages_for git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9077 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../generators/components/scaffold/templates/view_edit.html.erb | 6 +++--- .../generators/components/scaffold/templates/view_new.html.erb | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'railties/lib') 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 @@

Editing <%= singular_name %>

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

<%%= f.label :<%= attribute.name %> %>
@@ -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 @@

New <%= singular_name %>

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

<%%= f.label :<%= attribute.name %> %>
@@ -14,4 +14,4 @@

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