From 0aace2986a9a7a6d4c84a9ba6819d3df7821e267 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 14 Oct 2023 10:15:24 -0400 Subject: Blogs have an author now --- app/mailers/comment_mailer.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'app/mailers') diff --git a/app/mailers/comment_mailer.rb b/app/mailers/comment_mailer.rb index e72b17d..aeed1b0 100644 --- a/app/mailers/comment_mailer.rb +++ b/app/mailers/comment_mailer.rb @@ -1,13 +1,11 @@ class CommentMailer < ApplicationMailer def new_comment_email @comment = params[:comment] - @admin = User.first # this is weird - mail(to: @admin.email, subject: "[Four Island] Comment on #{@comment.blog.title}") + mail(to: @comment.blog.user.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}") + mail(to: @comment.blog.user.email, subject: "[Four Island] Pending comment on #{@comment.blog.title}") end end -- cgit 1.4.1