|
|
@ -317,7 +317,7 @@ class CoursesController < ApplicationController
|
|
|
|
inform = Inform.new(container: @course)
|
|
|
|
inform = Inform.new(container: @course)
|
|
|
|
inform.name = params[:name]
|
|
|
|
inform.name = params[:name]
|
|
|
|
inform.description = params[:description]
|
|
|
|
inform.description = params[:description]
|
|
|
|
inform.position = @course.informs.maximum(:position) + 1
|
|
|
|
inform.position = @course.informs.maximum(:position).to_i + 1
|
|
|
|
inform.save!
|
|
|
|
inform.save!
|
|
|
|
normal_status("创建成功")
|
|
|
|
normal_status("创建成功")
|
|
|
|
end
|
|
|
|
end
|
|
|
|