app/controllers/comments_controller.rb in tkh_content-0.9.16 vs app/controllers/comments_controller.rb in tkh_content-0.9.17

- old
+ new

@@ -20,9 +20,10 @@ @comment = Comment.new(comment_params) @comment.author_id = current_user.id @comment.locale = I18n.locale.to_s @comment.status = 'pending' # translation not done with globalize3 but with locale files upon showing status to user if @comment.save + Activity.create doer_id: current_user.id, message: "left a comment attached to: #{view_context.link_to (@comment.commentable.try(:name) || @comment.commentable.try(:title) || 'unknown'), @comment.commentable}." redirect_to @comment.commentable, notice: t('comments.create.notice') else flash[:warning] = t('comments.create.warning') redirect_to @comment.commentable end