asciinema.org/app/mailers/user_mailer.rb

16 lines
459 B
Ruby
Raw Normal View History

class UserMailer < ActionMailer::Base
2012-06-07 21:58:06 +00:00
default :from => "ascii.io <hello@ascii.io>"
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