Class: Renalware::Patients::PrimaryCarePhysicianController
- Inherits:
-
BaseController
- Object
- ApplicationController
- ApplicationController
- BaseController
- Renalware::Patients::PrimaryCarePhysicianController
- Defined in:
- app/controllers/renalware/patients/primary_care_physician_controller.rb
Instance Method Summary collapse
-
#edit ⇒ Object
We come in here when 1.
- #update ⇒ Object
Methods inherited from BaseController
Instance Method Details
#edit ⇒ Object
We come in here when
-
We render the Add GP modal form the first time (html)
-
After a practice has been selected and we refresh the modal form so it has the correct list of GPs in it (js)
14 15 16 17 |
# File 'app/controllers/renalware/patients/primary_care_physician_controller.rb', line 14 def edit patient render_form end |
#update ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'app/controllers/renalware/patients/primary_care_physician_controller.rb', line 19 def update patient if update_patient redirect_to patient_path(patient), notice: "GP changed successfully" else flash[:error] = "The patient's GP was not changed" redirect_to patient_path(patient) end end |