|
|
|
@ -249,7 +249,7 @@ class ChallengesController < ApplicationController
|
|
|
|
|
next_challenge.update_attribute(:position, next_challenge.position - 1)
|
|
|
|
|
# 关卡位置被修改,需要修改脚本
|
|
|
|
|
script = modify_shixun_script @shixun, @shixun.evaluate_script
|
|
|
|
|
@shixun.update_column(:evaluate_script, script)
|
|
|
|
|
@shixun.shixun_info.update_column(:evaluate_script, script)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def index_up
|
|
|
|
@ -259,7 +259,7 @@ class ChallengesController < ApplicationController
|
|
|
|
|
last_challenge.update_attribute(:position, last_challenge.position + 1)
|
|
|
|
|
# 关卡位置被修改,需要修改脚本
|
|
|
|
|
script = modify_shixun_script @shixun, @shixun.evaluate_script
|
|
|
|
|
@shixun.update_column(:evaluate_script, script)
|
|
|
|
|
@shixun.shixun_info.update_column(:evaluate_script, script)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def destroy
|
|
|
|
|