Sha256: 2cb1fe795151df8b72f042471c9943826c6f917189e4225a282335653cd93178

Contents?: true

Size: 764 Bytes

Versions: 3

Compression:

Stored size: 764 Bytes

Contents

<%%= form_for(@<%= singular_table_name %>) do |f| %>
  <%% if @<%= singular_table_name %>.errors.any? %>
    <div class="alert-message block-message error">
      <p><%%= pluralize(@<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:</p>

      <ul>
      <%% @<%= singular_table_name %>.errors.full_messages.each do |msg| %>
        <li><%%= msg %></li>
      <%% end %>
      </ul>
    </div>
  <%% end %>

<% attributes.each do |attribute| -%>
  <div class="clearfix">
    <%%= f.label :<%= attribute.name %> %>
    <div class="input">
      <%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>
    </div>
  </div>
<% end -%>
  <div class="actions">
    <%%= f.submit %>
  </div>
<%% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bootstrap-generators-1.4.0 lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.erb
bootstrap-generators-1.0.1 lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.erb
bootstrap-generators-1.0.0 lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.erb