fixing school category order

pull/1/head
Jared Cosulich 7 years ago
parent cff7fc81e1
commit fcf15e9c2f

@ -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

@ -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"

Loading…
Cancel
Save