mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
fixing years on school page
This commit is contained in:
parent
2ddbb55a26
commit
9734b7dc06
1 changed files with 1 additions and 1 deletions
|
|
@ -11,7 +11,7 @@ class SchoolsController < ApplicationController
|
|||
authenticate(district.name.downcase, "#{district.name.downcase}!")
|
||||
|
||||
@school_categories = @school.school_categories.for_parent_category(@school, nil).valid.sort
|
||||
@years = @school_categories.map(&:year).map(&:to_i).sort
|
||||
@years = @school_categories.map(&:year).map(&:to_i).sort.uniq
|
||||
@year = (params[:year] || @years.first).to_i
|
||||
@years.delete(@year)
|
||||
@school_categories = @school_categories.select { |sc| sc.year.to_i == @year }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue