diff options
Diffstat (limited to 'app/mailers/comment_mailer.rb')
| -rw-r--r-- | app/mailers/comment_mailer.rb | 16 |
1 files changed, 16 insertions, 0 deletions
| diff --git a/app/mailers/comment_mailer.rb b/app/mailers/comment_mailer.rb new file mode 100644 index 0000000..41feede --- /dev/null +++ b/app/mailers/comment_mailer.rb | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | class CommentMailer < ApplicationMailer | ||
| 2 | def new_comment_email | ||
| 3 | @comment = params[:comment] | ||
| 4 | mail(to: @comment.blog.user.email, subject: "[Four Island] Comment on #{@comment.blog.title}") | ||
| 5 | end | ||
| 6 | |||
| 7 | def new_pending_comment_email | ||
| 8 | @comment = params[:comment] | ||
| 9 | mail(to: @comment.blog.user.email, subject: "[Four Island] Pending comment on #{@comment.blog.title}") | ||
| 10 | end | ||
| 11 | |||
| 12 | def reply_comment_email | ||
| 13 | @comment = params[:comment] | ||
| 14 | mail(to: @comment.reply_to.email, subject: "[Four Island] Reply to your comment on #{@comment.blog.title}") | ||
| 15 | end | ||
| 16 | end | ||
