作业的校验调整

dev_aliyun2
cxt 5 years ago committed by harry
parent 13c77cd147
commit 0eb3f2b45a

@ -1210,7 +1210,7 @@ class HomeworkCommonsController < ApplicationController
rescue Exception => e
uid_logger(e.message)
tip_exception("删除失败")
tip_exception(e.message)
raise ActiveRecord::Rollback
end
end

@ -38,7 +38,7 @@ class HomeworkCommon < ApplicationRecord
validates :name, presence: true, length: { maximum: 60, too_long: "不能超过60个字符" }
validates :description, length: { maximum: 15000, too_long: "不能超过15000个字符" }
validates :explanation, length: { maximum: 5000, too_long: "不能超过5000个字符" }
validates :reference_answer, length: { maximum: 15000, too_long: "不能超过15000个字符" }
validates :reference_answer, length: { maximum: 25000, too_long: "不能超过25000个字符" }
# after_update :update_activity
before_destroy :update_homework_bank_quotes

Loading…
Cancel
Save