Class: Renalware::Transplants::DonorFollowupsController
- Inherits:
-
BaseController
- Object
- ApplicationController
- ApplicationController
- BaseController
- BaseController
- Renalware::Transplants::DonorFollowupsController
- Defined in:
- app/controllers/renalware/transplants/donor_followups_controller.rb
Instance Method Summary collapse
Methods inherited from BaseController
Methods inherited from BaseController
Instance Method Details
#create ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'app/controllers/renalware/transplants/donor_followups_controller.rb', line 19 def create donor_followup = operation.build_followup donor_followup.attributes = followup_attributes if donor_followup.save redirect_to patient_transplants_donor_dashboard_path(patient) else render :new, locals: { patient: patient, donor_followup: donor_followup } end end |
#edit ⇒ Object
30 31 32 |
# File 'app/controllers/renalware/transplants/donor_followups_controller.rb', line 30 def edit render locals: { patient: patient, donor_followup: operation.followup } end |
#new ⇒ Object
14 15 16 17 |
# File 'app/controllers/renalware/transplants/donor_followups_controller.rb', line 14 def new donor_followup = operation.build_followup render locals: { patient: patient, donor_followup: donor_followup } end |
#show ⇒ Object
10 11 12 |
# File 'app/controllers/renalware/transplants/donor_followups_controller.rb', line 10 def show render locals: { patient: patient, donor_followup: operation.followup } end |
#update ⇒ Object
34 35 36 37 38 39 40 41 42 43 |
# File 'app/controllers/renalware/transplants/donor_followups_controller.rb', line 34 def update donor_followup = operation.followup donor_followup.attributes = followup_attributes if donor_followup.save redirect_to patient_transplants_donor_dashboard_path(patient) else render :edit, locals: { patient: patient, donor_followup: donor_followup } end end |