Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use the more modern error_messages from the form object rather than e…

…rror_messages_for

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9077 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 3e556d3dbc714ad0c55142198bb0d832df7c895b 1 parent 1ec8a7f
@dhh dhh authored
View
6 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 %>
View
6 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 %>
Please sign in to comment.
Something went wrong with that request. Please try again.