From 1d88f841d4508bb53d2edb6c4fa6ad0cdb46d5f7 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 17 Oct 2017 09:18:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B6=85=E7=BA=A7=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=E5=A5=96=E5=8A=B1=E7=94=A8=E6=88=B7=E9=87=91=E5=B8=81=E7=9A=84?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/comments_controller.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index c1357d064..414a6c558 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -78,10 +78,7 @@ class CommentsController < ApplicationController end def reply - comment = Comment.find(params[:id]) - @news = News.find comment.commented_id - new_comment = @news.comments.build(:author_id => User.current.id, :reply_id => params[:id], :comments => params[:content], :parent_id => comment.id) - @user_activity_id = params[:user_activity_id] + if new_comment.save update_course_activity(@news.class,@news.id) update_user_activity(@news.class,@news.id)