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.
9 lines
328 B
9 lines
328 B
5 years ago
|
class ExerciseBankStandardAnswer < ApplicationRecord
|
||
|
belongs_to :exercise_bank_question
|
||
|
belongs_to :exercise_bank_choice
|
||
|
#attr_accessible :answer_text
|
||
|
scope :standard_by_ids, lambda { |s| where(exercise_bank_choice_id: s) }
|
||
|
|
||
|
validates :answer_text, length: { maximum: 5000, too_long: "不能超过5000个字符" }
|
||
|
|
||
|
end
|