BUG修改
This commit is contained in:
parent
0de6cc8a31
commit
726697a69b
|
@ -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 }
|
||||
|
|
Loading…
Reference in New Issue