Module: Ecm::Contact::ContactRequest::Notification

Included in:
Ecm::Contact::ContactRequest
Defined in:
app/models/ecm/contact/contact_request.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



24
25
26
# File 'app/models/ecm/contact/contact_request.rb', line 24

def self.included(base)
  base.after_save :notify, if: -> { notified_at.nil? }
end

Instance Method Details

#notifyObject



28
29
30
# File 'app/models/ecm/contact/contact_request.rb', line 28

def notify
  NotifyNewContactRequestJob.perform_later(id)
end