Sha256: 916d24ca7455ab49d7caed159bf3a025443643422a4fa026674a63138a1c7a4b
Contents?: true
Size: 987 Bytes
Versions: 26
Compression:
Stored size: 987 Bytes
Contents
<div class="page-header"> <h1>New <%= human_name.titleize %></h1> </div> <%%= form_tag(<%= plural_name %>_url, method: 'post', 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 %>, nil, class: 'form-control' %> <% elsif attribute.field_type == :check_box -%> <%%= check_box_tag :<%= attribute.name %> %> <% else -%> <%%= <%= attribute.field_type %>_tag :<%= attribute.name %>, nil, class: 'form-control' %> <% end -%> </div> </div> <% end -%> <div class="form-group"> <div class="col-md-offset-2 col-md-6"> <%%= submit_tag "Create <%= human_name.titleize %>", class: 'btn btn-primary' %> </div> </div> <%% end %>
Version data entries
26 entries across 26 versions & 2 rubygems