优化代码
This commit is contained in:
parent
57a4f45cad
commit
da37a12158
|
@ -715,14 +715,14 @@ class BidsController < ApplicationController
|
|||
|
||||
def update
|
||||
@bid = Bid.find(params[:id])
|
||||
@project = @bid.courses.first
|
||||
@project = @bid.courses.first#Project.find(params[:course_id])
|
||||
if @bid.update_attributes(params[:bid])
|
||||
flash[:notice] = l(:label_update_homework_succeed)
|
||||
#@project = Project.find(params[:course_id])
|
||||
redirect_to project_homework_path(@project)
|
||||
else
|
||||
@bid.safe_attributes = params[:bid]
|
||||
render :action => 'edit', :layout =>'base_courses' ,:bid_id=>@bid.id,:project_id =>@project
|
||||
render :action => 'edit', :layout =>'base_courses'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue