Class: WCC::Contentful::Model::SectionContactForm
- Inherits:
-
WCC::Contentful::Model
- Object
- WCC::Contentful::Model
- WCC::Contentful::Model::SectionContactForm
- Defined in:
- lib/wcc/contentful/model/section_contact_form.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#page ⇒ Object
10 11 12 |
# File 'lib/wcc/contentful/model/section_contact_form.rb', line 10 def page ::WCC::Contentful::Model::Page.find_by(sections: { id: id }) end |
#send_email(data) ⇒ Object
4 5 6 7 8 |
# File 'lib/wcc/contentful/model/section_contact_form.rb', line 4 def send_email(data) save_contact_form(data) ::WCC::Contentful::App::ContactMailer.contact_form_email(data[:notification_email], data).deliver end |
#to_address(email_object_id: nil) ⇒ Object
14 15 16 17 18 |
# File 'lib/wcc/contentful/model/section_contact_form.rb', line 14 def to_address(email_object_id: nil) return email_address(email_model(email_object_id)) if email_object_id.present? notification_email end |