更新实训报错

dev_forum
daiao 5 years ago
parent 8f359dd9a1
commit cf714a85ea

@ -739,8 +739,8 @@ private
:hide_code, :forbid_copy) :hide_code, :forbid_copy)
end end
def shixun_info_params def shixun_info_params
raise("实训描述不能为空") if params[:description].blank? raise("实训描述不能为空") if params[:shixun_info][:description].blank?
raise("评测脚本不能为空") if params[:evaluate_script].blank? raise("评测脚本不能为空") if params[:shixun_info][:evaluate_script].blank?
params.require(:shixun_info).permit(:description, :evaluate_script) params.require(:shixun_info).permit(:description, :evaluate_script)
end end

Loading…
Cancel
Save