BUG修改

This commit is contained in:
nwb 2014-06-17 15:31:33 +08:00
parent 0de6cc8a31
commit 726697a69b
1 changed files with 1 additions and 1 deletions

View File

@ -196,7 +196,7 @@ class HomeworkAttachController < ApplicationController
def destroy def destroy
#@homework = HomeworkAttach.find(params[:id]) #@homework = HomeworkAttach.find(params[:id])
if User.current.admin? || User.current == @homework if User.current.admin? || User.current == @homework.user
if @homework.destroy if @homework.destroy
respond_to do |format| respond_to do |format|
format.html { redirect_to course_for_bid_path @homework.bid } format.html { redirect_to course_for_bid_path @homework.bid }