Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

root/trunk/railties/lib/rails_generator/generators/components/scaffold/templates/view_edit.html.erb

Revision 9077, 434 bytes (checked in by david, 9 months ago)

Use the more modern error_messages from the form object rather than error_messages_for

Line 
1 <h1>Editing <%= singular_name %></h1>
2
3 <%% form_for(@<%= singular_name %>) do |f| %>
4   <%%= f.error_messages %>
5
6 <% for attribute in attributes -%>
7   <p>
8                 <%%= f.label :<%= attribute.name %> %><br />
9     <%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>
10   </p>
11 <% end -%>
12   <p>
13     <%%= f.submit "Update" %>
14   </p>
15 <%% end %>
16
17 <%%= link_to 'Show', @<%= singular_name %> %> |
18 <%%= link_to 'Back', <%= plural_name %>_path %>
Note: See TracBrowser for help on using the browser.