|
|
@ -5,7 +5,7 @@ class CourseSecondCategory < ApplicationRecord
|
|
|
|
belongs_to :course_module
|
|
|
|
belongs_to :course_module
|
|
|
|
has_many :homework_commons
|
|
|
|
has_many :homework_commons
|
|
|
|
|
|
|
|
|
|
|
|
validates :name, length: { maximum: 30 }
|
|
|
|
validates :name, length: { maximum: 60 }
|
|
|
|
|
|
|
|
|
|
|
|
def category_type_str
|
|
|
|
def category_type_str
|
|
|
|
category_type == "graduation" && name == "毕设选题" ? "graduation_topics" : (
|
|
|
|
category_type == "graduation" && name == "毕设选题" ? "graduation_topics" : (
|
|
|
|