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/challenge_choose.rb

10 lines
348 B

6 years ago
class ChallengeChoose < ApplicationRecord
default_scope {order("challenge_chooses.position asc")}
6 years ago
belongs_to :challenge, optional: true
has_many :challenge_tags, :dependent => :destroy
has_many :challenge_questions, dependent: :destroy
5 years ago
validates :subject, length: { maximum: 25000, too_long: "不能超过25000个字符" }
6 years ago
end