Class: CommentMailer

Inherits:
ActionMailer::Base
  • Object
show all
Defined in:
app/mailers/comment_mailer.rb

Instance Method Summary collapse

Instance Method Details

#new_comment(comment) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'app/mailers/comment_mailer.rb', line 3

def new_comment(comment)
  if comment.user
    display_name = comment.user.display_name
  else
    display_name = I18n.t('muck.comment.anonymous')
  end
  @comment = comment
  @display_name = display_name
  mail(:to => emails_for_comment(comment), :subject => I18n.t('muck.comments.new_comment_email_subject', :name => display_name, :application_name => MuckEngine.configuration.application_name)) do |format|
    format.html
    format.text
  end
end