|
|
@ -9,7 +9,7 @@ class HacksController < ApplicationController
|
|
|
|
def start
|
|
|
|
def start
|
|
|
|
# 未发布的编程题,只能作者、或管理员访问
|
|
|
|
# 未发布的编程题,只能作者、或管理员访问
|
|
|
|
start_hack_auth
|
|
|
|
start_hack_auth
|
|
|
|
user_hack = @hack.hack_user_lastest_codes.mine(current_user.id)
|
|
|
|
user_hack = @hack.hack_user_lastest_codes.where(user_id: current_user.id).first
|
|
|
|
logger.info("#user_hack: #{user_hack}")
|
|
|
|
logger.info("#user_hack: #{user_hack}")
|
|
|
|
identifier =
|
|
|
|
identifier =
|
|
|
|
if user_hack.present?
|
|
|
|
if user_hack.present?
|
|
|
|