blob: d02028d9839d48d1c29b5ff0a6523c837e21b4d7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
<%% form_for(@<%= singular_name %>) do |f| %>
<%%= f.error_messages %>
<% for attribute in attributes -%>
<div class="field">
<%%= f.label :<%= attribute.name %> %><br />
<%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>
</div>
<% end -%>
<div class="actions">
<%% if @<%= singular_name %>.new_record? %>
<%%= f.submit 'Create' %>
<%% else %>
<%%= f.submit 'Update' %>
<%% end %>
</div>
<%% end %>
|