Sha256: 1f34c8fb0b294f8dd9807a0212ed4b84df3933f08eb803b5d0d02dd9b8f14e6c

Contents?: true

Size: 770 Bytes

Versions: 9

Compression:

Stored size: 770 Bytes

Contents

<%%= form_with(model: @<%= singular_table_name %>, local: true, class: 'ui form') do |f| %>
  <%% 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.full_messages.each do |message| %>
        <li><%%= message %></li>
      <%% end %>
      </ul>
    </div>
  <%% end %>
<% attributes.each do |attribute| -%>
  <div class="field">
    <%%= f.label :<%= attribute.name %> %>
    <%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>
  </div>
<% end -%>
  <div class="actions">
    <%%= f.submit class: 'ui button' %>
  </div>
<%% end %>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
semantic_ui_views_generator-0.0.9 lib/generators/semantic/templates/scaffolds/erb/_form.html.erb
semantic_ui_views_generator-0.0.8 lib/generators/semantic/templates/scaffolds/erb/_form.html.erb
semantic_ui_views_generator-0.0.7 lib/generators/semantic/templates/scaffolds/erb/_form.html.erb
semantic_ui_views_generator-0.0.6 lib/generators/semantic/templates/scaffolds/erb/_form.html.erb
semantic_ui_views_generator-0.0.5 lib/generators/semantic/templates/scaffolds/erb/_form.html.erb
semantic_ui_views_generator-0.0.4 lib/generators/semantic/templates/scaffolds/erb/_form.html.erb
semantic_ui_views_generator-0.0.3 lib/generators/semantic/templates/scaffolds/erb/_form.html.erb
semantic_ui_views_generator-0.0.2 lib/generators/semantic/templates/scaffolds/erb/_form.html.erb
semantic_ui_views_generator-0.0.1 lib/generators/semantic/templates/scaffolds/erb/_form.html.erb