Class: NotificationMailers::Mentioned

Inherits:
Base
  • Object
show all
Defined in:
app/mailers/notification_mailers/mentioned.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

#postObject

Returns the value of attribute post


5
6
7
# File 'app/mailers/notification_mailers/mentioned.rb', line 5

def post
  @post
end

Instance Method Details

#set_headers(target_id) ⇒ Object


8
9
10
11
12
13
# File 'app/mailers/notification_mailers/mentioned.rb', line 8

def set_headers(target_id)
  @post = Mention.find_by_id(target_id).mentions_container

  @headers[:subject] = I18n.t('notifier.mentioned.subject', :name => @sender.name)
  @headers[:in_reply_to] = @headers[:references] = "<#{@post.guid}@#{AppConfig.pod_uri.host}>"
end