Class: Renalware::Transplants::RegistrationsController
- Inherits:
-
BaseController
- Object
- ApplicationController
- ApplicationController
- BaseController
- BaseController
- Renalware::Transplants::RegistrationsController
- Defined in:
- app/controllers/renalware/transplants/registrations_controller.rb
Instance Method Summary collapse
Methods inherited from BaseController
Methods inherited from BaseController
Instance Method Details
#edit ⇒ Object
18 19 20 |
# File 'app/controllers/renalware/transplants/registrations_controller.rb', line 18 def edit render locals: { patient: patient, registration: registration } end |
#show ⇒ Object
10 11 12 13 14 15 16 |
# File 'app/controllers/renalware/transplants/registrations_controller.rb', line 10 def show if registration.new_record? redirect_to edit_patient_transplants_registration_path(patient) else render locals: { patient: patient, registration: registration } end end |
#update ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'app/controllers/renalware/transplants/registrations_controller.rb', line 22 def update if update_registration redirect_to patient_transplants_recipient_dashboard_path(patient), notice: t(".success", model_name: "registration") else flash.now[:error] = t(".failed", model_name: "registration") render :edit, locals: { patient: patient, registration: registration } end end |