Sha256: 0de0741802cabaae9b3a34923748256a41c20a90a3dffaae815ae6f70873689f

Contents?: true

Size: 893 Bytes

Versions: 3

Compression:

Stored size: 893 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 %>, :class => "<%= [:datetime_select, :date_select].include?(attribute.field_type) ? 'small' : 'xxlarge' %>" %>
    </div>
  </div>
<% end -%>
  <div class="actions">
    <%%= f.submit :class => "btn primary" %>
  </div>
<%% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bootstrap-generators-0.0.6 lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/_form.html.erb
bootstrap-generators-0.0.5 lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/_form.html.erb
bootstrap-generators-0.0.4 lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/_form.html.erb