dev_forum
jingquan huang 5 years ago
parent 6bbb8e050e
commit 85b2db7ac1

@ -210,15 +210,15 @@ class ApplicationController < ActionController::Base
User.current = User.find 12
end
User.current = User.find 81403
# if params[:debug] == 'teacher' #todo 为了测试,记得讲debug删除
# User.current = User.find 81403
# elsif params[:debug] == 'student'
# User.current = User.find 8686
# elsif params[:debug] == 'admin'
# User.current = User.find 1
# end
# User.current = User.find 81403
if params[:debug] == 'teacher' #todo 为了测试,记得讲debug删除
User.current = User.find 81403
elsif params[:debug] == 'student'
User.current = User.find 8686
elsif params[:debug] == 'admin'
User.current = User.find 1
end
end
# Sets the logged in user

@ -1,5 +1,6 @@
class ChallengesController < ApplicationController
before_action :require_login
before_action :check_auth
before_action :find_shixun, only: [:new, :create, :index]
skip_before_action :verify_authenticity_token, only: [:create, :update, :create_choose_question, :crud_answer]
before_action :find_challenge, only: [:edit, :show, :update, :create_choose_question, :index_down, :index_up,

Loading…
Cancel
Save