Class: Helpdesk::Comment
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Helpdesk::Comment
- Defined in:
- app/models/helpdesk/comment.rb
Instance Method Summary collapse
Instance Method Details
#check_reopen ⇒ Object
12 13 14 15 16 |
# File 'app/models/helpdesk/comment.rb', line 12 def check_reopen if ticket.requester == ticket.update_column(:status ,:waiting) end end |
#send_email ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'app/models/helpdesk/comment.rb', line 19 def send_email if self.public? if ticket.requester == Helpdesk::NotificationsMailer.comment_by_requester_notification(self).deliver_now if ticket.requester Helpdesk::NotificationsMailer.comment_by_requester_confirmation(self).deliver_now if Helpdesk.send_confirmation_emails else Helpdesk::NotificationsMailer.comment_by_helpdesk_notification(self).deliver_now if ticket.requester Helpdesk::NotificationsMailer.comment_by_helpdesk_confirmation(self).deliver_now if Helpdesk.send_confirmation_emails end end end |