journalduhacker/app/mailers/email_reply.rb

27 lines
620 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 => "[#{Rails.application.name}] Reply from " <<
"#{comment.user.username} on #{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 => "[#{Rails.application.name}] Mention from " <<
"#{comment.user.username} on #{comment.story.title}"
)
end
2012-07-03 18:59:50 +02:00
end