blob: 473ebe14fb35b8dda615f7a83cb8b684244a62b9 (
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="attribute">
<%%= f.label :<%= attribute.name %> %><br />
<%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>
</div>
<% end -%>
<div class="action">
<%% if @<%= singular_name %>.new_record? %>
<%%= f.submit 'Create' %>
<%% else %>
<%%= f.submit 'Update' %>
<%% end %>
</div>
<%% end %>
|