Class: NotificationMailers::LikedComment

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

#likeObject

Returns the value of attribute like.



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

def like
  @like
end

Instance Method Details

#set_headers(like_id) ⇒ Object

rubocop:disable Naming/AccessorMethodName



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

def set_headers(like_id) # rubocop:disable Naming/AccessorMethodName
  @like = Like.find(like_id)

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