diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-10-12 21:51:02 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-10-12 21:51:02 -0400 |
commit | 9ad3bca2ea475b709c8311ab25194e4578c1a0d9 (patch) | |
tree | b60fa4048784bb36853d461fc6df14579a241534 /app/mailers | |
parent | 2022e18daab968ad49af9b3e59969ef1ed110436 (diff) | |
download | thoughts-9ad3bca2ea475b709c8311ab25194e4578c1a0d9.tar.gz thoughts-9ad3bca2ea475b709c8311ab25194e4578c1a0d9.tar.bz2 thoughts-9ad3bca2ea475b709c8311ab25194e4578c1a0d9.zip |
Webmaster gets an email when a comment is posted
Diffstat (limited to 'app/mailers')
-rw-r--r-- | app/mailers/application_mailer.rb | 2 | ||||
-rw-r--r-- | app/mailers/comment_mailer.rb | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index 286b223..4862159 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb | |||
@@ -1,4 +1,4 @@ | |||
1 | class ApplicationMailer < ActionMailer::Base | 1 | class ApplicationMailer < ActionMailer::Base |
2 | default from: 'from@example.com' | 2 | default from: 'no-reply@fourisland.com' |
3 | layout 'mailer' | 3 | layout 'mailer' |
4 | end | 4 | end |
diff --git a/app/mailers/comment_mailer.rb b/app/mailers/comment_mailer.rb new file mode 100644 index 0000000..363875a --- /dev/null +++ b/app/mailers/comment_mailer.rb | |||
@@ -0,0 +1,7 @@ | |||
1 | class CommentMailer < ApplicationMailer | ||
2 | def new_comment_email | ||
3 | @comment = params[:comment] | ||
4 | @admin = User.first # this is weird | ||
5 | mail(to: @admin.email, subject: "[Four Island] Comment on #{@comment.blog.title}") | ||
6 | end | ||
7 | end | ||