Sha256: e62120e5073d82a957d1b9c0495f45d72390a53bcda500b30d555c59be46863d

Contents?: true

Size: 759 Bytes

Versions: 5

Compression:

Stored size: 759 Bytes

Contents

<%%= bootstrap_form_for(@<%= singular_table_name %>, layout: :horizontal, label_col: 'col-sm-2 col-form-label', control_col: 'col-sm-10') do |f| %>

<% attributes.each do |attribute| -%>
  <% if attribute.field_type == :check_box -%>
  <%%= f.form_group :<%= attribute.name %>, label: { text: '<%= attribute.name %>' } do %>
    <%%= f.<%= attribute.field_type %> :<%= attribute.name %>, label: '' %>
  <%% end -%>
  <% else -%>
  <%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>
  <% end -%>
<% end -%>

  <div class='form-group row'>
    <div class='col-sm-2'></div>
    <div class='col-sm-10'>
      <%%= f.submit 'Submit', class: 'btn btn-primary' %>
      <%%= back_link class: 'btn btn-default pull-right' %>
    </div>
  </div>

<%% end %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
chaltron-1.0.4 lib/templates/erb/scaffold/_form.html.erb
chaltron-1.0.3 lib/templates/erb/scaffold/_form.html.erb
chaltron-1.0.2 lib/templates/erb/scaffold/_form.html.erb
chaltron-1.0.1 lib/templates/erb/scaffold/_form.html.erb
chaltron-1.0.0 lib/templates/erb/scaffold/_form.html.erb