Sha256: e758149e570d0b36121c0810cefc6938c5ff985c93228768d6d61b938a7081b1

Contents?: true

Size: 1.19 KB

Versions: 26

Compression:

Stored size: 1.19 KB

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' %>
    <div class="col-md-6">
<% if attribute.field_type == :date_select || attribute.field_type == :time_select || attribute.field_type == :datetime_select -%>
      <%%= text_field_tag :<%= attribute.name %>, @<%= singular_table_name %>.<%= attribute.name %>, class: 'form-control' %>
<% elsif attribute.field_type == :check_box -%>
      <%%= check_box_tag :<%= attribute.name %>, 1, @<%= singular_table_name %>.<%= attribute.name %>? %>
<% else -%>
      <%%= <%= attribute.field_type %>_tag :<%= attribute.name %>, @<%= singular_table_name %>.<%= attribute.name %>, class: 'form-control' %>
<% end -%>
    </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

26 entries across 26 versions & 2 rubygems

Version Path
ez-1.3.0 lib/generators/ez/resource/templates/bootstrapped/edit.html.erb
ez-1.2.0 lib/generators/ez/resource/templates/bootstrapped/edit.html.erb
ez-1.1.3 lib/generators/ez/resource/templates/bootstrapped/edit.html.erb
ez-1.1.2 lib/generators/ez/resource/templates/bootstrapped/edit.html.erb
ez-1.1.1 lib/generators/ez/resource/templates/bootstrapped/edit.html.erb
ez-1.1.0 lib/generators/ez/resource/templates/bootstrapped/edit.html.erb
ez-1.0.0 lib/generators/ez/resource/templates/bootstrapped/edit.html.erb
ez-0.9.9 lib/generators/ez/resource/templates/bootstrapped/edit.html.erb
ez-0.9.7 lib/generators/ez/resource/templates/bootstrapped/edit.html.erb
ez-0.9.6 lib/generators/ez/resource/templates/bootstrapped/edit.html.erb
ez-0.9.5 lib/generators/ez/resource/templates/bootstrapped/edit.html.erb
ez-0.9.1 lib/generators/ez/resource/templates/bootstrapped/edit.html.erb
ez-0.9.0 lib/generators/ez/resource/templates/bootstrapped/edit.html.erb
ez-0.8.7 lib/generators/ez/resource/templates/bootstrapped/edit.html.erb
ez-0.8.6 lib/generators/ez/resource/templates/bootstrapped/edit.html.erb
ez-0.7.0 lib/generators/ez/resource/templates/bootstrapped/edit.html.erb
ez-0.6.5 lib/generators/ez/resource/templates/bootstrapped/edit.html.erb
ez-0.6.4 lib/generators/ez/resource/templates/bootstrapped/edit.html.erb
ez-0.6.3 lib/generators/ez/resource/templates/bootstrapped/edit.html.erb
ez-0.6.2 lib/generators/ez/resource/templates/bootstrapped/edit.html.erb