hendolim/countonanon

View on GitHub
app/views/profiles/_search_form.html.erb

Summary

Maintainability
Test Coverage
<fieldset class="search-field">
  <%= search_form_for @search do |f| %>
    <!-- <div class="field">
      <%= f.label :class_rank_cont, "Class Rank contains" %>
      <%= f.text_field :class_rank_cont %>
    </div> -->

    <div class="char-section">
    <h5>Mental Health Disorder</h5>
    <%= f.collection_check_boxes :characteristics_id_in_any, Characteristic.where('id > 0').limit(10), :id, :name do |b| %>
      <div class="collection-check-box">
        <%= b.check_box %>
        <%= b.label :class => "char-option" %>
      </div>
    <% end %>
  </div>
  <div class="char-section">
    <h5> Gender </h5>
    <%= f.collection_check_boxes :characteristics_id_in_any, Characteristic.where('id > 10').limit(8), :id, :name do |b| %>
      <div class="collection-check-box">
        <%= b.check_box %>
        <%= b.label :class => "char-option" %>
      </div>
    <% end %>
  </div>
  <div class="char-section">
    <h5> Ethnicity </h5>
    <%= f.collection_check_boxes :characteristics_id_in_any, Characteristic.where('id > 17').limit(16), :id, :name do |b| %>
      <div class="collection-check-box">
        <%= b.check_box %>
        <%= b.label :class => "char-option" %>
      </div>
    <% end %>
  </div>
  <div class="char-section">
    <h5>Academic Focus</h5>
    <%= f.collection_check_boxes :characteristics_id_in_any, Characteristic.where('id > 33').limit(16), :id, :name do |b| %>
      <div class="collection-check-box">
        <%= b.check_box %>
        <%= b.label :class => "char-option" %>
      </div>
    <% end %>
  </div>
  <div class="char-section">
    <h5>Religion</h5>
    <%= f.collection_check_boxes :characteristics_id_in_any, Characteristic.where('id > 49').limit(13), :id, :name do |b| %>
      <div class="collection-check-box">
        <%= b.check_box %>
        <%= b.label :class => "char-option" %>
      </div>
    <% end %>
  </div>

    <div class="actions"><%= f.submit "Search", class: 'btn btn-primary button-bottom' %></div>
  <% end %>
</fieldset>