Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_Ysm
commit
ac5a69d635
@ -0,0 +1,2 @@
|
||||
json.content @content
|
||||
json.path @path
|
@ -0,0 +1,11 @@
|
||||
class MigrateCourseGroupPosition < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
Course.all.each do |course|
|
||||
if course.course_groups.exists?(position: 0)
|
||||
course.course_groups.each_with_index do |group, index|
|
||||
group.update_attributes(position: index+1)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue