mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 13:38:18 -08:00
23 lines
456 B
Ruby
23 lines
456 B
Ruby
class BrowseController < ApplicationController
|
|
def show
|
|
@category = CategoryPresenter.new(
|
|
category: SqmCategory.find_by_name('Teachers & Leadership'),
|
|
academic_year: academic_year,
|
|
school: school,
|
|
)
|
|
end
|
|
|
|
private
|
|
|
|
def school
|
|
@school ||= School.find_by_slug school_slug
|
|
end
|
|
|
|
def school_slug
|
|
params[:school_id]
|
|
end
|
|
|
|
def academic_year
|
|
@academic_year ||= AcademicYear.find_by_range params[:year]
|
|
end
|
|
end
|