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)