2012-04-12 13:49:20 +00:00
|
|
|
class UserMailer < ActionMailer::Base
|
2013-09-22 12:07:42 +00:00
|
|
|
default :from => "asciinema <hello@asciinema.org>"
|
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
|