journalduhacker/app/mailers/email_reply.rb

25 lines
728 B
Ruby
Raw Normal View History

2012-07-03 18:59:50 +02:00
class EmailReply < ActionMailer::Base
default :from => "#{Rails.application.name} " <<
"<nobody@#{Rails.application.domain}>"
2012-07-03 18:59:50 +02:00
def reply(comment, user)
2013-02-14 01:50:51 +01:00
@comment = comment
2012-07-03 18:59:50 +02:00
@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}")
)
2012-07-03 18:59:50 +02:00
end
def mention(comment, user)
2013-02-14 01:50:51 +01:00
@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
2012-07-03 18:59:50 +02:00
end