From 2c4419794c54c9df101f0dc745ae7246b68b0efc Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 25 Nov 2019 14:16:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9D=83=E9=99=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/hacks_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/hacks_controller.rb b/app/controllers/hacks_controller.rb index aee4ba338..0a8a24f08 100644 --- a/app/controllers/hacks_controller.rb +++ b/app/controllers/hacks_controller.rb @@ -1,8 +1,9 @@ class HacksController < ApplicationController before_action :require_login, except: [:index] + before_action :find_hack, only: [:edit, :update, :publish, :start, :update_set, :delete_set] before_action :require_teacher_identity, only: [:create, :update_set] before_action :require_auth_identity, only: [:update, :edit, :publish, :update_set, :delete_set] - before_action :find_hack, only: [:edit, :update, :publish, :start, :update_set, :delete_set] + # 开启编程,如果第一次开启,创建一条记录,如果已经开启过的话,直接返回标识即可 def start