Class: Feedback::Feedback
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Feedback::Feedback
- Defined in:
- lib/nexmo_developer/app/models/feedback/feedback.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#source ⇒ Object
Returns the value of attribute source.
Instance Method Summary collapse
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
11 12 13 |
# File 'lib/nexmo_developer/app/models/feedback/feedback.rb', line 11 def email @email end |
#source ⇒ Object
Returns the value of attribute source.
11 12 13 |
# File 'lib/nexmo_developer/app/models/feedback/feedback.rb', line 11 def source @source end |
Instance Method Details
#notify ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/nexmo_developer/app/models/feedback/feedback.rb', line 28 def notify OrbitFeedbackNotifier.call(self) if !owner.nil? && owner.email.present? return unless ENV['SLACK_WEBHOOK'] FeedbackSlackNotifier.call(self) end |
#set_resource ⇒ Object
24 25 26 |
# File 'lib/nexmo_developer/app/models/feedback/feedback.rb', line 24 def set_resource self.resource ||= Resource.find_or_create_by!(uri: source) end |