don't show invalid categories

This commit is contained in:
Jared Cosulich 2018-01-30 14:45:03 -05:00
parent e05134c3ba
commit d8a6821ebb
2 changed files with 3 additions and 3 deletions

View file

@ -9,7 +9,7 @@ class SchoolsController < ApplicationController
def show
district = @school.district
authenticate(district.name.downcase, "#{district.name.downcase}!")
@school_categories = @school.school_categories.for_parent_category(@school, nil).sort
@school_categories = @school.school_categories.for_parent_category(@school, nil).valid.sort
end
def admin