asciinema.org/app/mailers/user_mailer.rb

16 lines
465 B
Ruby
Raw Normal View History

class UserMailer < ActionMailer::Base
2013-09-22 12:07:42 +00:00
default :from => "asciinema <hello@asciinema.org>"
helper :application
def new_comment_email(user, comment)
@comment = comment
2012-12-08 19:48:22 +00:00
@author = UserDecorator.new(comment.user)
@asciicast = AsciicastDecorator.new(@comment.asciicast)
2012-12-08 19:48:22 +00:00
user = UserDecorator.new(user)
to = "#{user.nickname} <#{user.email}>"
2012-11-19 21:12:57 +00:00
subject = %(New comment for #{@asciicast.title})
mail :to => to, :subject => subject
end
end