Class: Renalware::Patients::PrimaryCarePhysicianController

Inherits:
BaseController show all
Defined in:
app/controllers/renalware/patients/primary_care_physician_controller.rb

Instance Method Summary collapse

Methods inherited from BaseController

#patient

Instance Method Details

#editObject



10
11
12
13
# File 'app/controllers/renalware/patients/primary_care_physician_controller.rb', line 10

def edit
  authorize patient
  render_form
end

#updateObject



15
16
17
18
19
20
21
22
23
# File 'app/controllers/renalware/patients/primary_care_physician_controller.rb', line 15

def update
  authorize 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