超级管理员奖励用户金币的功能

This commit is contained in:
daiao 2017-10-17 09:18:01 +08:00
parent 2e2e83bc62
commit 1d88f841d4
1 changed files with 1 additions and 4 deletions

View File

@ -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)