Class: Renalware::HD::CurrentProfileController

Inherits:
BaseController show all
Defined in:
app/controllers/renalware/hd/current_profile_controller.rb

Instance Method Summary collapse

Methods inherited from BaseController

#patient

Instance Method Details

#editObject



15
16
17
# File 'app/controllers/renalware/hd/current_profile_controller.rb', line 15

def edit
  render :edit, locals: locals
end

#showObject



11
12
13
# File 'app/controllers/renalware/hd/current_profile_controller.rb', line 11

def show
  render :show, locals: locals
end

#updateObject



19
20
21
22
23
24
25
26
27
# File 'app/controllers/renalware/hd/current_profile_controller.rb', line 19

def update
  if update_profile
    redirect_to patient_hd_dashboard_path(patient),
      notice: t(".success", model_name: "HD profile")
  else
    flash.now[:error] = t(".failed", model_name: "HD profile")
    render :edit, locals: locals
  end
end