Skip to content

Commit

Permalink
Decorate users in UserMailer
Browse files Browse the repository at this point in the history
  • Loading branch information
ku1ik committed Dec 8, 2012
1 parent a1fad7c commit 780dff5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/mailers/user_mailer.rb
Expand Up @@ -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
Expand Down

0 comments on commit 780dff5

Please sign in to comment.