Class: Hertz::Email::NotificationDeliveryJob
- Inherits:
-
ActiveJob::Base
- Object
- ActiveJob::Base
- Hertz::Email::NotificationDeliveryJob
- Defined in:
- app/jobs/hertz/email/notification_delivery_job.rb
Instance Method Summary collapse
Instance Method Details
#perform(notification) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'app/jobs/hertz/email/notification_delivery_job.rb', line 8 def perform(notification) return unless notification.receiver.hertz_email.present? return if notification.delivered_with?(:email) Hertz::Email::NotificationMailer.notification_email(notification).deliver_now notification.mark_delivered_with(:email) end |