Class: Renalware::Virology::ProfilesController

Inherits:
BaseController show all
Defined in:
app/controllers/renalware/virology/profiles_controller.rb

Instance Method Summary collapse

Methods inherited from BaseController

#patient

Instance Method Details

#editObject



8
9
10
11
12
# File 'app/controllers/renalware/virology/profiles_controller.rb', line 8

def edit
  profile = find_profile
  authorize profile
  render_edit(profile: profile)
end

#updateObject



14
15
16
17
18
19
20
21
22
# File 'app/controllers/renalware/virology/profiles_controller.rb', line 14

def update
  profile = find_profile
  authorize profile
  if update_profile(profile)
    redirect_to patient_virology_dashboard_path(patient)
  else
    render_edit(profile: profile)
  end
end