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


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

def post
  @post
end

Instance Method Details

#set_headers(target_id) ⇒ Object


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

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

  @headers[:subject] = I18n.t('notifier.mentioned.subject', :name => @sender.name)
end