mentioning
This commit is contained in:
@@ -16,18 +16,42 @@ class RedstonerMailer < ActionMailer::Base
|
||||
mail(to: "redstonerserver@gmail.com", subject: "#{@user.name} registered on Redstoner")
|
||||
end
|
||||
|
||||
def new_thread_mention_mail(user, thread)
|
||||
@user = user
|
||||
@thread = thread
|
||||
mail(to: @user.email, subject: "#{thread.author.name} mentioned you in '#{thread.title}' on Redstoner")
|
||||
end
|
||||
|
||||
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_thread_reply_mention_mail(user, reply)
|
||||
@user = user
|
||||
@reply = reply
|
||||
mail(to: @user.email, subject: "#{reply.author.name} mentioned you in '#{reply.thread.title}' on Redstoner")
|
||||
end
|
||||
|
||||
def new_post_mention_mail(user, post)
|
||||
@user = user
|
||||
@post = post
|
||||
mail(to: @user.email, subject: "#{post.author.name} mentioned you in '#{post.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 new_post_comment_mention_mail(user, comment)
|
||||
@user = user
|
||||
@comment = comment
|
||||
mail(to: @user.email, subject: "#{comment.author.name} mentioned you in '#{comment.blogpost.title}' on Redstoner")
|
||||
end
|
||||
|
||||
def email_change_confirm_mail(user)
|
||||
@user = user
|
||||
mail(to: @user.email, subject: "Email change on Redstoner.com")
|
||||
|
||||
Reference in New Issue
Block a user