Sha256: f0ee8e0479f9b02adce422342d75bdc00fc4d720ed6ab7ef57c95959fc4138b8
Contents?: true
Size: 527 Bytes
Versions: 5
Compression:
Stored size: 527 Bytes
Contents
module Ecm::Contact class NotifyNewContactRequestJob < ApplicationJob queue_as :contact_requests def perform(contact_request_id) load_contact_request(contact_request_id) deliver mark_as_notified end private def load_contact_request(id) @contact_request = ContactRequest.find(id) end def deliver ContactRequestMailer.notify(@contact_request).deliver_now end def mark_as_notified @contact_request.update(notified_at: Time.zone.now) end end end
Version data entries
5 entries across 5 versions & 1 rubygems