修改课程列表还显示已删除班级的BUG

This commit is contained in:
yuanke 2016-07-06 15:58:10 +08:00
parent b994e786ab
commit 796c5d5666
1 changed files with 4 additions and 0 deletions

View File

@ -14,6 +14,10 @@ class SyllabusesService
courses.each do |c|
other.courses << c[:course] unless c[:course].syllabus
end
user.syllabuses.each do |syllabus|
syllabus.courses = syllabus.courses.not_deleted
end
user.syllabuses.to_a << other
end