exceptionHandle
xianbo 12 years ago
parent fd14457446
commit d3f46adc34

@ -373,7 +373,7 @@ class BidsController < ApplicationController
#by xianbo
def homework_destroy
@bid_to_destroy = Bid.find params[:course_id]
(render_403; return false) unless User.current.admin?||User.current.id==bid.author_id
(render_403; return false) unless User.current.admin?||User.current.id==@bid_to_destroy.author_id
@bid_to_destroy.destroy
respond_to do |format|
format.html { redirect_to :back }

Loading…
Cancel
Save