You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
456 B
24 lines
456 B
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
|