Files
nairobi/app/mailers/mailer.rb
Juanjo Bazán c08d2cdf08 improves emails
Adds texts and i18n, ready to add design now.
Advances #221
2015-08-21 23:01:51 +02:00

18 lines
408 B
Ruby

class Mailer < ApplicationMailer
def comment(comment)
@comment = comment
@debate = comment.debate
mail(to: @debate.author.email, subject: t('mailer.comment.subject'))
end
def reply(reply)
@reply = reply
@debate = @reply.debate
parent = Comment.find(@reply.parent_id)
@recipient = parent.author
mail(to: @recipient.email, subject: t('mailer.reply.subject'))
end
end