Class: NotificationMailers::CommentOnPost

Inherits:
Base
  • Object
show all
Defined in:
app/mailers/notification_mailers/comment_on_post.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#recipient, #sender

Instance Method Summary collapse

Methods inherited from Base

#headers, #initialize, #name_and_address

Constructor Details

This class inherits a constructor from NotificationMailers::Base

Instance Attribute Details

#commentObject

Returns the value of attribute comment


3
4
5
# File 'app/mailers/notification_mailers/comment_on_post.rb', line 3

def comment
  @comment
end

Instance Method Details

#set_headers(comment_id) ⇒ Object


5
6
7
8
9
10
# File 'app/mailers/notification_mailers/comment_on_post.rb', line 5

def set_headers(comment_id)
  @comment = Comment.find(comment_id)

  @headers[:from] = "\"#{@comment.author_name} (diaspora*)\" <#{AppConfig.mail.sender_address}>"
  @headers[:subject] = "Re: #{@comment.comment_email_subject}"
end