From 726697a69bfae661234851587a5c590836ffea9a Mon Sep 17 00:00:00 2001 From: nwb Date: Tue, 17 Jun 2014 15:31:33 +0800 Subject: [PATCH] =?UTF-8?q?BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/homework_attach_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/homework_attach_controller.rb b/app/controllers/homework_attach_controller.rb index 2922eea1a..311d9c1a8 100644 --- a/app/controllers/homework_attach_controller.rb +++ b/app/controllers/homework_attach_controller.rb @@ -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 }