Sha256: 59f6170f6ac7402ad86faa7803081ea03854dca6361a6aa7d630e712c0f644c1
Contents?: true
Size: 1.18 KB
Versions: 1
Compression:
Stored size: 1.18 KB
Contents
<%%= form_with(model: <%= model_resource_name %>, local: true) do |form| %> <%% if <%= singular_table_name %>.errors.any? %> <div id="error_explanation"> <h2><%%= pluralize(<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:</h2> <ul> <%% <%= singular_table_name %>.errors.each do |error| %> <li><%%= error.full_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 class="field"> <%%= form.label :password_confirmation %> <%%= form.password_field :password_confirmation %> <% elsif attribute.attachments? -%> <%%= form.label :<%= attribute.column_name %> %> <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, multiple: true %> <% else -%> <%%= form.label :<%= attribute.column_name %> %> <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %> %> <% end -%> </div> <% end -%> <div class="actions"> <%%= form.submit %> </div> <%% end %>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
railties-6.1.0.rc1 | lib/rails/generators/erb/scaffold/templates/_form.html.erb.tt |