Sha256: cd3f35c4b2c7dd52e851f3edeac8a9b3cf390784d54a0b54323c67634aa5026d
Contents?: true
Size: 1.32 KB
Versions: 1
Compression:
Stored size: 1.32 KB
Contents
<%%= form_with(model: <%= "[:#{prefix}, #{singular_table_name}]" %>, local: true) do |form| %> <%% if @<%= singular_table_name %>.errors.any? %> <div id="error_explanation"> <h2>请检查下面的<%%= @<%= singular_table_name %>.errors.count %>个错误之后重试:</h2> <ul> <%% @<%= singular_table_name %>.errors.full_messages.each do |message| %> <li><%%= message %></li> <%% end %> </ul> </div> <%% end %> <% attributes.each do |attribute| -%> <div class="field"> <% if attribute.password_digest? -%> <%%= form.label :password %> <%%= form.password_field :password %> </div> <div> <%%= 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 -%> </div> <% end -%> <div class="actions"> <%%= 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" %> </div> <%% end %>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
admin_help-0.1.4 | lib/generators/admin/scaffold_controller/templates/views/erb/_form.html.erb.erb |