Sha256: 044820cb8eb76993303daa2d85c687809ead0a087c18217b1148035087482429

Contents?: true

Size: 753 Bytes

Versions: 1

Compression:

Stored size: 753 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

1 entries across 1 versions & 1 rubygems

Version Path
chaltron-1.0.5 lib/templates/erb/scaffold/_form.html.erb