From 0f509921cc25a06eae1ed577bc91673e5f4f8f0d Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 13 Mar 2020 19:49:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E6=BA=90=E5=88=97=E8=A1=A8=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/files_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 6a7f7b4b0..8e6356201 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -367,9 +367,9 @@ class FilesController < ApplicationController @category_name = category.try(:module_name) else @category = CourseSecondCategory.find category_id - @category_id = category.try(:id) - @category_name = category.try(:name) - @parent_category_id = category&.parent_id.to_i + @category_id = @category.try(:id) + @category_name = @category.try(:name) + @parent_category_id = @category&.parent_id.to_i end end