Class: Renalware::Messaging::Internal::MessagesController
- Inherits:
-
BaseController
- Object
- ApplicationController
- ApplicationController
- BaseController
- Renalware::Messaging::Internal::MessagesController
- Includes:
- PresenterHelper, Concerns::Pageable
- Defined in:
- app/controllers/renalware/messaging/internal/messages_controller.rb
Instance Method Summary collapse
Methods included from PresenterHelper
Instance Method Details
#create ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'app/controllers/renalware/messaging/internal/messages_controller.rb', line 18 def create Message, :create? form = MessageForm.new() if form.valid? = SendMessage.call(author: , patient: patient, form: form) flash.now[:notice] = "Message was successfully sent" render_create() else render_new(form) end end |
#new ⇒ Object
12 13 14 15 16 |
# File 'app/controllers/renalware/messaging/internal/messages_controller.rb', line 12 def new Message, :new? form = MessageFormBuilder.new(patient: patient, params: params).call render_new(form) end |