<%%= form_with(model: <%= "[:#{prefix}, #{singular_table_name}]" %>, local: true) do |form| %> <%% if @<%= singular_table_name %>.errors.any? %>

请检查下面的<%%= @<%= singular_table_name %>.errors.count %>个错误之后重试:

<%% end %> <% attributes.each do |attribute| -%>
<% if attribute.password_digest? -%> <%%= form.label :password %> <%%= form.password_field :password %>
<%%= form.label :password_confirmation %> <%%= form.password_field :password_confirmation %> <% else -%> <% if attribute.reference? -%> <%%= form.label :<%= attribute.column_name %> %> <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %> %> <% else -%> <%%= form.label :<%= attribute.name %> %> <%%= form.<%= attribute.field_type %> :<%= attribute.name %> %> <% end -%> <% end -%>
<% end -%>
<%%= form.button t('buttons.save'), data: { disable_with: "保存中..." }, class: "button button--primary" %> <%%= link_to t('buttons.cancel'), <%= prefixed_index_helper %>_path, class: "button button--info" %>
<%% end %>