From 8531ab51ab2c4df9bc19b7ce92b891e8f8667f7d Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 30 Oct 2015 14:22:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88=E5=A4=A7=E7=BA=B2=E4=B8=8D?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8D=9A=E5=AE=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/blog_comments_controller.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/controllers/blog_comments_controller.rb b/app/controllers/blog_comments_controller.rb index e398501e4..ce0d7481a 100644 --- a/app/controllers/blog_comments_controller.rb +++ b/app/controllers/blog_comments_controller.rb @@ -57,9 +57,7 @@ class BlogCommentsController < ApplicationController def destroy @article = BlogComment.find(params[:id]) if @article.parent_id.nil? #如果是文章被删,那么跳转到用户博客界面,如果带了course_id过来,那么就要跳转到课程首页 - if params[:course_id] - @article.children.delete - @article.delete + if params[:course_id] #如果带了课程id过来,说明这是课程大纲,不要删除,只需取消课程大纲就ok了 @course = Course.find(params[:course_id]) @course.outline = 0 @course.save