aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/generators/erb/scaffold/templates/new.html.erb
blob: 96c89fc50ed705dc091a24ebf90d3b8002194bdd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<h1>New <%= singular_name %></h1>

<%% form_for(@<%= singular_name %>) do |f| %>
  <%%= f.error_messages %>

<% for attribute in attributes -%>
  <p>
    <%%= f.label :<%= attribute.name %> %><br />
    <%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>
  </p>
<% end -%>
  <p>
    <%%= f.submit 'Create' %>
  </p>
<%% end %>

<%%= link_to 'Back', <%= plural_name %>_path %>