Class: Incline::ContactMessage
- Inherits:
-
Object
- Object
- Incline::ContactMessage
- Includes:
- ActiveModel::Model, ActiveModel::Validations
- Defined in:
- app/models/incline/contact_message.rb
Overview
Defines the message generated by the generic contact form.
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#recaptcha ⇒ Object
Returns the value of attribute recaptcha.
-
#related_to ⇒ Object
Returns the value of attribute related_to.
-
#remote_ip ⇒ Object
Returns the value of attribute remote_ip.
-
#subject ⇒ Object
Returns the value of attribute subject.
-
#your_email ⇒ Object
Returns the value of attribute your_email.
-
#your_name ⇒ Object
Returns the value of attribute your_name.
Instance Method Summary collapse
-
#full_subject ⇒ Object
Gets the full subject for the message.
-
#send_message ⇒ Object
Sends the message.
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
8 9 10 |
# File 'app/models/incline/contact_message.rb', line 8 def body @body end |
#recaptcha ⇒ Object
Returns the value of attribute recaptcha.
8 9 10 |
# File 'app/models/incline/contact_message.rb', line 8 def recaptcha @recaptcha end |
#related_to ⇒ Object
Returns the value of attribute related_to.
8 9 10 |
# File 'app/models/incline/contact_message.rb', line 8 def @related_to end |
#remote_ip ⇒ Object
Returns the value of attribute remote_ip.
8 9 10 |
# File 'app/models/incline/contact_message.rb', line 8 def remote_ip @remote_ip end |
#subject ⇒ Object
Returns the value of attribute subject.
8 9 10 |
# File 'app/models/incline/contact_message.rb', line 8 def subject @subject end |
#your_email ⇒ Object
Returns the value of attribute your_email.
8 9 10 |
# File 'app/models/incline/contact_message.rb', line 8 def your_email @your_email end |
#your_name ⇒ Object
Returns the value of attribute your_name.
8 9 10 |
# File 'app/models/incline/contact_message.rb', line 8 def your_name @your_name end |
Instance Method Details
#full_subject ⇒ Object
Gets the full subject for the message.
19 20 21 22 |
# File 'app/models/incline/contact_message.rb', line 19 def full_subject return if subject.blank? "#{}: #{subject}" end |
#send_message ⇒ Object
Sends the message.
26 27 28 |
# File 'app/models/incline/contact_message.rb', line 26 def Incline::ContactForm.contact(self).deliver_now end |