Class: Spotlight::ContactForm
- Inherits:
-
Object
- Object
- Spotlight::ContactForm
- Includes:
- ActiveModel::Model
- Defined in:
- app/models/spotlight/contact_form.rb
Overview
Exhibit feedback form
Instance Attribute Summary collapse
-
#current_exhibit ⇒ Object
Returns the value of attribute current_exhibit.
-
#current_url ⇒ Object
Returns the value of attribute current_url.
-
#email ⇒ Object
Returns the value of attribute email.
-
#message ⇒ Object
Returns the value of attribute message.
-
#name ⇒ Object
Returns the value of attribute name.
-
#request ⇒ Object
Returns the value of attribute request.
Instance Method Summary collapse
Instance Attribute Details
#current_exhibit ⇒ Object
Returns the value of attribute current_exhibit.
7 8 9 |
# File 'app/models/spotlight/contact_form.rb', line 7 def current_exhibit @current_exhibit end |
#current_url ⇒ Object
Returns the value of attribute current_url.
7 8 9 |
# File 'app/models/spotlight/contact_form.rb', line 7 def current_url @current_url end |
#email ⇒ Object
Returns the value of attribute email.
7 8 9 |
# File 'app/models/spotlight/contact_form.rb', line 7 def email @email end |
#message ⇒ Object
Returns the value of attribute message.
7 8 9 |
# File 'app/models/spotlight/contact_form.rb', line 7 def @message end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'app/models/spotlight/contact_form.rb', line 7 def name @name end |
#request ⇒ Object
Returns the value of attribute request.
7 8 9 |
# File 'app/models/spotlight/contact_form.rb', line 7 def request @request end |
Instance Method Details
#headers ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'app/models/spotlight/contact_form.rb', line 11 def headers { to: to, subject: "#{I18n.t(:'blacklight.application_name')} Contact Form", from: %("#{name}" <#{email}>), cc: current_exhibit.contact_emails.join(', ') } end |