班级动态
This commit is contained in:
parent
c7bb53d2bd
commit
0b4db97756
|
@ -61,7 +61,7 @@ class AdminController < ApplicationController
|
|||
if params[:syllabus_id] && params[:course_id]
|
||||
course = Course.where("id = #{params[:course_id].to_i}").first
|
||||
unless course.nil?
|
||||
course.update_attribute('syllabus_id', params[:syllabus_id].to_i)
|
||||
course.update_column('syllabus_id', params[:syllabus_id].to_i)
|
||||
@flag = true
|
||||
end
|
||||
end
|
||||
|
@ -124,11 +124,11 @@ class AdminController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
#修改课程名称
|
||||
#修改班级名称
|
||||
def update_course_name
|
||||
@course = Course.where("id = #{params[:course_id].to_i}").first
|
||||
unless @course.nil?
|
||||
@course.update_attribute("name", params[:name])
|
||||
@course.update_column("name", params[:name])
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue