2012-04-12 13:49:20 +00:00
|
|
|
class UserMailer < ActionMailer::Base
|
2012-06-07 21:58:06 +00:00
|
|
|
default :from => "ascii.io <hello@ascii.io>"
|
2012-06-10 13:16:12 +00:00
|
|
|
helper :application
|
2012-04-12 13:49:20 +00:00
|
|
|
|
|
|
|
def new_comment_email(user, comment)
|
|
|
|
@comment = comment
|
2012-12-08 19:48:22 +00:00
|
|
|
@author = UserDecorator.new(comment.user)
|
2012-04-12 13:49:20 +00:00
|
|
|
@asciicast = AsciicastDecorator.new(@comment.asciicast)
|
|
|
|
|
2012-12-08 19:48:22 +00:00
|
|
|
user = UserDecorator.new(user)
|
2013-08-14 14:30:49 +00:00
|
|
|
to = "#{user.nickname} <#{user.email}>"
|
2012-11-19 21:12:57 +00:00
|
|
|
subject = %(New comment for #{@asciicast.title})
|
2012-04-12 13:49:20 +00:00
|
|
|
mail :to => to, :subject => subject
|
|
|
|
end
|
|
|
|
end
|