修复编辑作业提交返回错误信息时填入正确信息后异常bug
This commit is contained in:
parent
fcc5f220ce
commit
57a4f45cad
|
@ -715,13 +715,14 @@ class BidsController < ApplicationController
|
|||
|
||||
def update
|
||||
@bid = Bid.find(params[:id])
|
||||
@project = @bid.courses.first
|
||||
if @bid.update_attributes(params[:bid])
|
||||
flash[:notice] = l(:label_update_homework_succeed)
|
||||
@project = Project.find(params[:course_id])
|
||||
#@project = Project.find(params[:course_id])
|
||||
redirect_to project_homework_path(@project)
|
||||
else
|
||||
@bid.safe_attributes = params[:bid]
|
||||
render :action => 'edit'
|
||||
render :action => 'edit', :layout =>'base_courses' ,:bid_id=>@bid.id,:project_id =>@project
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue