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.
sqm-dashboards/app/controllers/sqm_categories_controller.rb

20 lines
445 B

class SqmCategoriesController < SqmApplicationController
def show
@categories = SqmCategory.all.order(:sort_index).map do |category|
CategoryPresenter.new(
category: category,
academic_year: academic_year,
school: school,
)
end
@category = CategoryPresenter.new(
category: SqmCategory.find_by_slug(params[:id]),
academic_year: academic_year,
school: school,
)
end
end