add info mail for new blog comments

This commit is contained in:
jomo
2014-05-03 03:33:09 +02:00
parent 4130216e11
commit e0b1540593
6 changed files with 51 additions and 33 deletions

View File

@@ -16,12 +16,18 @@ class RedstonerMailer < ActionMailer::Base
mail(to: "redstonerserver@gmail.com", subject: "#{@user.name} registered on Redstoner")
end
def thread_reply_mail(user, reply)
def new_thread_reply_mail(user, reply)
@user = user
@reply = reply
mail(to: @user.email, subject: "#{reply.author.name} replied to '#{reply.thread.title}' on Redstoner")
end
def new_post_comment_mail(user, comment)
@user = user
@comment = comment
mail(to: @user.email, subject: "#{comment.author.name} replied to '#{comment.blogpost.title}' on Redstoner")
end
def email_change_confirm_mail(user)
@user = user
mail(to: @user.email, subject: "Email change on Redstoner.com")