lib/generators/starter/resource/templates/bootstrapped/edit.html.erb in starter_generators-0.9.0 vs lib/generators/starter/resource/templates/bootstrapped/edit.html.erb in starter_generators-0.9.1
- old
+ new
@@ -5,10 +5,14 @@
<%%= 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' %>
- <div class="col-md-6">
+ <%
+ 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 %>