Class: FeedbackPopup::Message
- Inherits:
-
Object
- Object
- FeedbackPopup::Message
- Includes:
- ActiveModel::Conversion, ActiveModel::Validations
- Defined in:
- app/models/feedback_popup/message.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
Instance Method Summary collapse
- #deliver ⇒ Object
-
#initialize(attributes = {}) ⇒ Message
constructor
A new instance of Message.
- #persisted? ⇒ Boolean
Constructor Details
#initialize(attributes = {}) ⇒ Message
Returns a new instance of Message.
9 10 11 12 13 |
# File 'app/models/feedback_popup/message.rb', line 9 def initialize(attributes = {}) attributes.each do |key, value| self.send("#{key}=", value) end end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
5 6 7 |
# File 'app/models/feedback_popup/message.rb', line 5 def body @body end |
Instance Method Details
#deliver ⇒ Object
15 16 17 18 19 20 21 |
# File 'app/models/feedback_popup/message.rb', line 15 def deliver if self.valid? FeedbackPopup::Mailer.feedback(self).deliver return true end return false end |
#persisted? ⇒ Boolean
23 24 25 |
# File 'app/models/feedback_popup/message.rb', line 23 def persisted? false end |