From 26a7339889929025495df59776d1a33ca19c77ae Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Fri, 13 Oct 2023 13:18:18 -0400 Subject: Pending comments also send you an email now --- app/mailers/comment_mailer.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/mailers/comment_mailer.rb') diff --git a/app/mailers/comment_mailer.rb b/app/mailers/comment_mailer.rb index 363875a..e72b17d 100644 --- a/app/mailers/comment_mailer.rb +++ b/app/mailers/comment_mailer.rb @@ -4,4 +4,10 @@ class CommentMailer < ApplicationMailer @admin = User.first # this is weird mail(to: @admin.email, subject: "[Four Island] Comment on #{@comment.blog.title}") end + + def new_pending_comment_email + @comment = params[:comment] + @admin = User.first # this is weird + mail(to: @admin.email, subject: "[Four Island] Pending comment on #{@comment.blog.title}") + end end -- cgit 1.4.1