diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index f7172021c..0eaeae7de 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -739,8 +739,8 @@ private :hide_code, :forbid_copy) end def shixun_info_params - raise("实训描述不能为空") if params[:description].blank? - raise("评测脚本不能为空") if params[:evaluate_script].blank? + raise("实训描述不能为空") if params[:shixun_info][:description].blank? + raise("评测脚本不能为空") if params[:shixun_info][:evaluate_script].blank? params.require(:shixun_info).permit(:description, :evaluate_script) end