Class: Renalware::Messaging::Internal::ReceiptsController
- Inherits:
-
BaseController
- Object
- ApplicationController
- ApplicationController
- BaseController
- Renalware::Messaging::Internal::ReceiptsController
- Includes:
- PresenterHelper, Concerns::Pageable
- Defined in:
- app/controllers/renalware/messaging/internal/receipts_controller.rb
Instance Method Summary collapse
-
#mark_as_read ⇒ Object
PATCH.
-
#read ⇒ Object
GET all read messages.
-
#sent ⇒ Object
GET all sent messages.
-
#unread ⇒ Object
GET aka inbox.
Methods included from PresenterHelper
Methods inherited from BaseController
Instance Method Details
#mark_as_read ⇒ Object
PATCH
30 31 32 33 34 35 36 |
# File 'app/controllers/renalware/messaging/internal/receipts_controller.rb', line 30 def mark_as_read receipt receipt.update(read_at: Time.zone.now) render locals: { receipt: ReceiptPresenter.new(receipt) } end |
#read ⇒ Object
GET all read messages
20 21 22 |
# File 'app/controllers/renalware/messaging/internal/receipts_controller.rb', line 20 def read render_receipts(read_receipts) end |
#sent ⇒ Object
GET all sent messages
25 26 27 |
# File 'app/controllers/renalware/messaging/internal/receipts_controller.rb', line 25 def sent render_receipts(sent_receipts) end |
#unread ⇒ Object
GET aka inbox
15 16 17 |
# File 'app/controllers/renalware/messaging/internal/receipts_controller.rb', line 15 def unread render_receipts(unread_receipts) end |