Decorate users in UserMailer
This commit is contained in:
parent
a1fad7ccb7
commit
780dff5db1
@ -4,9 +4,10 @@ class UserMailer < ActionMailer::Base
|
||||
|
||||
def new_comment_email(user, comment)
|
||||
@comment = comment
|
||||
@author = comment.user
|
||||
@author = UserDecorator.new(comment.user)
|
||||
@asciicast = AsciicastDecorator.new(@comment.asciicast)
|
||||
|
||||
user = UserDecorator.new(user)
|
||||
to = "~#{user.nickname} <#{user.email}>"
|
||||
subject = %(New comment for #{@asciicast.title})
|
||||
mail :to => to, :subject => subject
|
||||
|
Loading…
Reference in New Issue
Block a user