fixing years on school page

This commit is contained in:
Jared Cosulich 2018-07-21 13:03:55 -04:00
parent b5f950c7bd
commit 2ddbb55a26
2 changed files with 6 additions and 3 deletions

View file

@ -14,7 +14,7 @@ class SchoolsController < ApplicationController
@years = @school_categories.map(&:year).map(&:to_i).sort
@year = (params[:year] || @years.first).to_i
@years.delete(@year)
# @school_categories = @school_categories.select { |sc| sc.year.to_i == @year }
@school_categories = @school_categories.select { |sc| sc.year.to_i == @year }
end
def admin