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
This commit is contained in:
David Heinemeier Hansson
2008-03-22 04:47:53 +00:00
parent 1ec8a7f4e0
commit 3e556d3dbc
2 changed files with 6 additions and 6 deletions

View File

@@ -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 %>

View File

@@ -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 %>