add the root in bid modify about homework

This commit is contained in:
xianbo 2013-10-31 16:33:15 +08:00
parent 9f8c764053
commit 67d228142a
1 changed files with 5 additions and 1 deletions

View File

@ -585,14 +585,18 @@ class BidsController < ApplicationController
end
def edit
@bid = Bid.find(params[:bid_id])
if (User.current.admin?||User.current.id==@bid.author_id)&&(@bid.homework_type == 1)
@project_id = params[:project_id]
@bid = Bid.find(params[:bid_id])
respond_to do |format|
format.html {
@project = Project.find(params[:project_id])
@user= User.find(User.current.id)
render :layout => 'base_courses'
}
end
else
render 403
end
end