mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
Handle case when category is nil in analyzecontroller
This commit is contained in:
parent
6764024cd2
commit
143e0237e4
1 changed files with 1 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue