Class: Motor::NotificationsMailer
- Inherits:
-
ApplicationMailer
- Object
- ActionMailer::Base
- ApplicationMailer
- Motor::NotificationsMailer
- Defined in:
- app/mailers/motor/notifications_mailer.rb
Instance Method Summary collapse
Instance Method Details
#notify_mention_email(notification) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/mailers/motor/notifications_mailer.rb', line 5 def notify_mention_email(notification) @notification = notification @note = notification.record subject = "#{@note.&.email || 'Anonymous'} mentioned you in " \ "#{@note.record.class.model_name.human} ##{@note.record.id}" mail( from: from_address, to: notification.recipient.email, subject: subject ) end |
#notify_reminder_email(notification) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 |
# File 'app/mailers/motor/notifications_mailer.rb', line 21 def notify_reminder_email(notification) @notification = notification @note = notification.record.record mail( from: from_address, to: notification.recipient.email, subject: "Reminder for #{@note.record.class.model_name.human} ##{@note.record.id}" ) end |