修复新建课程时报错的BUG
This commit is contained in:
parent
18271946d7
commit
d999a9f4a6
|
@ -499,7 +499,7 @@ class CoursesController < ApplicationController
|
||||||
|
|
||||||
def create
|
def create
|
||||||
cs = CoursesService.new
|
cs = CoursesService.new
|
||||||
@course = cs.create_course params,User.current
|
@course = cs.create_course(params,User.current)[:course]
|
||||||
if @course.new_record?
|
if @course.new_record?
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { render :action => 'new', :layout => 'base' } #Added by young
|
format.html { render :action => 'new', :layout => 'base' } #Added by young
|
||||||
|
|
Loading…
Reference in New Issue