diff options
Diffstat (limited to 'app/controllers/admin')
-rw-r--r-- | app/controllers/admin/comments_controller.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/admin/comments_controller.rb b/app/controllers/admin/comments_controller.rb index ccde3e6..9958232 100644 --- a/app/controllers/admin/comments_controller.rb +++ b/app/controllers/admin/comments_controller.rb | |||
@@ -14,6 +14,10 @@ class Admin::CommentsController < Admin::AdminController | |||
14 | @comment.status = :published | 14 | @comment.status = :published |
15 | @comment.save! | 15 | @comment.save! |
16 | 16 | ||
17 | if @comment.reply_to and @comment.reply_to.email != @comment.blog.user.email and @comment.reply_to.email != current_user.email | ||
18 | CommentMailer.with(comment: @comment).reply_comment_email.deliver_later | ||
19 | end | ||
20 | |||
17 | flash.notice = "Comment successfully published." | 21 | flash.notice = "Comment successfully published." |
18 | redirect_to pending_admin_comments_url | 22 | redirect_to pending_admin_comments_url |
19 | end | 23 | end |