优化代码

exceptionHandle
z9hang 11 years ago
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…
Cancel
Save