重置实训

dev_jupyter
daiao 5 years ago
parent cd80381510
commit 03a72aedc8

@ -22,8 +22,8 @@ class MyshixunsController < ApplicationController
tip_exception("403", "") tip_exception("403", "")
end end
begin begin
@shixun = Shixun.select(:id, :identifier, :challenges_count).find(@myshixun.shixun_id)
ActiveRecord::Base.transaction do ActiveRecord::Base.transaction do
@shixun = Shixun.select(:id, :identifier, :challenges_count).find(@myshixun.shixun_id)
@myshixun.destroy! @myshixun.destroy!
StudentWork.where(:myshixun_id => @myshixun.id) StudentWork.where(:myshixun_id => @myshixun.id)

Loading…
Cancel
Save