You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/app/models/shixun_work_comment.rb

8 lines
311 B

class ShixunWorkComment < ApplicationRecord
belongs_to :student_work
belongs_to :user
belongs_to :challenge, optional: true
validates :comment, length: { maximum: 500, too_long: "不能超过500个字符" }
validates :hidden_comment, length: { maximum: 500, too_long: "不能超过500个字符" }
end