Class: NotificationMailers::MentionedInComment

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

Returns the value of attribute comment


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

def comment
  @comment
end

Instance Method Details

#set_headers(target_id) ⇒ Object

rubocop:disable Naming/AccessorMethodName


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

def set_headers(target_id) # rubocop:disable Naming/AccessorMethodName
  @comment = Mention.find_by_id(target_id).mentions_container

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