From b0171aef5dba65d5319e2535af0897168a51899e Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 24 Jul 2019 14:01:28 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9A=90=E8=97=8F=E4=BB=A3=E7=A0=81=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E7=9A=84=E5=AE=9E=E8=AE=AD=E3=80=82=E8=AF=84=E6=B5=8B?= =?UTF-8?q?=E9=80=9A=E8=BF=87=E4=B8=8D=E4=BF=9D=E5=AD=98=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 2ab0c6649..5eca6ccf9 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -319,7 +319,8 @@ class ApplicationController < ActionController::Base # 通关后,把最后一次成功的代码存到数据库 # type 0 创始内容, 1 最新内容 def game_passed_code(path, myshixun, game_id) - return if path.blank? + # 如果代码窗口是隐藏的,则不用保存代码 + return if myshixun.shixun.hide_code file_content = git_fle_content myshixun.repo_path, path unless file_content.present? raise("获取文件代码异常")