Merge branch 'dev_cxt' into dev_item_bank

dev_jupyter
cxt 5 years ago
commit 7f6d2de67e

@ -12,7 +12,7 @@ class Admins::ExaminationAuthenticationsController < Admins::BaseController
ActiveRecord::Base.transaction do
exam = ExaminationBank.find current_apply.container_id
current_apply.update!(status: 1)
exam.update!(public: 0)
exam.update!(public: 1)
end
render_success_js
end

@ -16,7 +16,7 @@ class Admins::ItemAuthenticationsController < Admins::BaseController
ActiveRecord::Base.transaction do
item = ItemBank.find current_apply.container_id
current_apply.update!(status: 1)
item.update!(public: 0)
item.update!(public: 1)
end
render_success_js
end

@ -50,8 +50,11 @@ class ExaminationBanksController < ApplicationController
end
def destroy
@exam.destroy!
render_ok
ActiveRecord::Base.transaction do
ApplyAction.where(container_type: "ExaminationBank", container_id: @exam.id).destroy_all
@exam.destroy!
render_ok
end
end
def set_public

@ -39,8 +39,11 @@ class ItemBanksController < ApplicationController
end
def destroy
@item.destroy!
render_ok
ActiveRecord::Base.transaction do
ApplyAction.where(container_type: "ItemBank", container_id: @item.id).destroy_all
@item.destroy!
render_ok
end
end
def set_public

Loading…
Cancel
Save