题库的关联删除

dev_tj
cxt 5 years ago
parent 34c5c550fa
commit d91153f5f3

@ -41,6 +41,9 @@ class ItemBanksController < ApplicationController
def destroy
ActiveRecord::Base.transaction do
ApplyAction.where(container_type: "ItemBank", container_id: @item.id).destroy_all
if @item.item_type == "PROGRAM"
@item.container&.destroy!
end
@item.destroy!
render_ok
end

Loading…
Cancel
Save