Sha256: 1cd04bbb623bc6011af0f93fc4d44d48ada6afb414587c45d019bd46aba990ce

Contents?: true

Size: 923 Bytes

Versions: 4

Compression:

Stored size: 923 Bytes

Contents

<div class="page-header">
  <h1>Editing <%= human_name.titleize %> #<%%= @<%= singular_table_name %>.id %></h1>
</div>

<%%= form_tag(<%= singular_table_name %>_url(@<%= singular_table_name %>), method: 'patch', class: 'form-horizontal') do %>

  <% attributes.each do |attribute| -%>
<div class="form-group">
    <%%= label_tag :<%= attribute.name %>, nil, class: 'col-md-2 control-label' %>
    <%
      colsize = 6
      colsize = 2 if attribute.type == :integer
    %>
    <div class="col-md-<%= colsize %>">
      <%%= <%= attribute.field_type %>_tag :<%= attribute.name %>, @<%= singular_table_name %>.<%= attribute.name %><%= "?" if attribute.type == :boolean %>, class: 'form-control'%>
    </div>
  </div>

  <% end %>
    <div class="form-group">
    <div class="col-md-offset-2 col-md-6">
          <%%= submit_tag "Update <%= human_name.titleize %>", class: 'btn btn-primary' %>
    </div>
  </div>

<%% end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
starter_generators-0.9.4 lib/generators/starter/resource/templates/bootstrapped/edit.html.erb
starter_generators-0.9.3 lib/generators/starter/resource/templates/bootstrapped/edit.html.erb
starter_generators-0.9.2 lib/generators/starter/resource/templates/bootstrapped/edit.html.erb
starter_generators-0.9.1 lib/generators/starter/resource/templates/bootstrapped/edit.html.erb