journalduhacker/app/mailers/email_reply.rb
2017-02-08 08:14:56 +01:00

25 lines
728 B
Ruby

class EmailReply < ActionMailer::Base
default :from => "#{Rails.application.name} " <<
"<nobody@#{Rails.application.domain}>"
def reply(comment, user)
@comment = comment
@user = user
mail(
:to => user.email,
:subject => I18n.t('mailers.email_reply.replysubject', :appname => "#{Rails.application.name}", :author => "#{comment.user.username}", :story => "#{comment.story.title}")
)
end
def mention(comment, user)
@comment = comment
@user = user
mail(
:to => user.email,
:subject => I18n.t('mailers.email_reply.mentionsubject', :appname => "#{Rails.application.name}", :author => "#{comment.user.username}", :story => "#{comment.story.title}")
)
end
end