Sha256: 803ec72a7f3a0dab4652d08473b743e7d2e6e7719e4cf78f069b73f85b5ef962
Contents?: true
Size: 528 Bytes
Versions: 56
Compression:
Stored size: 528 Bytes
Contents
module Cmor::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
56 entries across 56 versions & 1 rubygems