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
#@homework = HomeworkAttach.find(params[:id])
if User.current.admin? || User.current == @homework
if User.current.admin? || User.current == @homework.user
if @homework.destroy
respond_to do |format|
format.html { redirect_to course_for_bid_path @homework.bid }