about summary refs log tree commit diff stats
path: root/app/controllers/comments_controller.rb
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-10-13 13:18:18 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-10-13 13:18:18 -0400
commit26a7339889929025495df59776d1a33ca19c77ae (patch)
treec4d6fa581ac816fe97ace4bd9c7f5c6cacfceabd /app/controllers/comments_controller.rb
parentd365294db7edd79f01b51ac30413707a556f84bb (diff)
downloadthoughts-26a7339889929025495df59776d1a33ca19c77ae.tar.gz
thoughts-26a7339889929025495df59776d1a33ca19c77ae.tar.bz2
thoughts-26a7339889929025495df59776d1a33ca19c77ae.zip
Pending comments also send you an email now
Diffstat (limited to 'app/controllers/comments_controller.rb')
-rw-r--r--app/controllers/comments_controller.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index c66365b..a444dba 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb
@@ -46,6 +46,8 @@ class CommentsController < ApplicationController
46 46
47 if @comment.status == :published 47 if @comment.status == :published
48 CommentMailer.with(comment: @comment).new_comment_email.deliver_later 48 CommentMailer.with(comment: @comment).new_comment_email.deliver_later
49 else
50 CommentMailer.with(comment: @comment).new_pending_comment_email.deliver_later
49 end 51 end
50 else 52 else
51 flash.alert = "Error posting comment." 53 flash.alert = "Error posting comment."