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/analyze_controller.rb

14 lines
508 B

class AnalyzeController < SqmApplicationController
def index
@category ||= Category.find_by_category_id(params[:category])
@category ||= Category.first
@categories = Category.all.order(:category_id)
@subcategories = @category.subcategories.order(:subcategory_id)
@subcategory ||= Subcategory.find_by_subcategory_id(params[:subcategory])
@subcategory ||= @subcategories.first
@measures = @subcategory.measures.order(:measure_id).includes(%i[scales admin_data_items])
end
end