Class: Integral::Enquiry
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Integral::Enquiry
- Defined in:
- app/models/integral/enquiry.rb
Overview
Represents a contact enquiry made by visitors
Instance Method Summary collapse
-
#process ⇒ Object
Forward the enquiry on and send an auto reply.
-
#reference ⇒ Object
Reference used to uniquely identify the enquiry.
Instance Method Details
#process ⇒ Object
Forward the enquiry on and send an auto reply. Create newsletter signup if necessary
17 18 19 20 21 |
# File 'app/models/integral/enquiry.rb', line 17 def process ContactMailer.forward_enquiry(self).deliver_later ContactMailer.auto_reply(self).deliver_later NewsletterSignup.create(name: name, email: email, context: context) if end |
#reference ⇒ Object
Reference used to uniquely identify the enquiry
24 25 26 27 |
# File 'app/models/integral/enquiry.rb', line 24 def reference num = 3008 + id "##{num}" end |