aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2008-03-22 04:47:53 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2008-03-22 04:47:53 +0000
commit3e556d3dbc714ad0c55142198bb0d832df7c895b (patch)
tree6b4aed69709ed8270d04d08eb270d1df6fd09815 /railties/lib
parent1ec8a7f4e0acd45d960512d2736d90473714ad48 (diff)
downloadrails-3e556d3dbc714ad0c55142198bb0d832df7c895b.tar.gz
rails-3e556d3dbc714ad0c55142198bb0d832df7c895b.tar.bz2
rails-3e556d3dbc714ad0c55142198bb0d832df7c895b.zip
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
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails_generator/generators/components/scaffold/templates/view_edit.html.erb6
-rw-r--r--railties/lib/rails_generator/generators/components/scaffold/templates/view_new.html.erb6
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