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