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