fixing school category order

This commit is contained in:
Jared Cosulich 2018-07-29 10:00:41 -04:00
parent cff7fc81e1
commit fcf15e9c2f
2 changed files with 5 additions and 1 deletions

View file

@ -14,6 +14,10 @@ class SchoolCategory < ApplicationRecord
scope :valid, -> { where("response_count > #{MIN_RESPONSE_COUNT} or zscore is not null") }
def root_index
category.root_index
end
def answer_index_average
answer_index_total.to_f / response_count.to_f
end

View file

@ -9,6 +9,6 @@
%p No data is displayed for this school because of insufficient responses.
- else
.row
= render @school_categories
= render @school_categories.sort(&:root_index)
= render "shared/performance_spectrum"