Class: Mailboxer::NotificationMailer
- Inherits:
-
BaseMailer
- Object
- ActionMailer::Base
- BaseMailer
- Mailboxer::NotificationMailer
- Defined in:
- app/mailers/mailboxer/notification_mailer.rb
Instance Method Summary collapse
-
#new_notification_email(notification, receiver) ⇒ Object
Sends an email for indicating a new message for the receiver.
-
#send_email(notification, receiver) ⇒ Object
Sends an email for indicating a new notification to a receiver.
Instance Method Details
#new_notification_email(notification, receiver) ⇒ Object
Sends an email for indicating a new message for the receiver
9 10 11 12 13 14 15 16 |
# File 'app/mailers/mailboxer/notification_mailer.rb', line 9 def new_notification_email(notification, receiver) @notification = notification @receiver = receiver set_subject(notification) mail :to => receiver.send(Mailboxer.email_method, notification), :subject => t('mailboxer.notification_mailer.subject', :subject => @subject), :template_name => 'new_notification_email' end |
#send_email(notification, receiver) ⇒ Object
Sends an email for indicating a new notification to a receiver. It calls new_notification_email.
4 5 6 |
# File 'app/mailers/mailboxer/notification_mailer.rb', line 4 def send_email(notification, receiver) new_notification_email(notification, receiver) end |