Class: Renalware::LowClearance::ProfilesController

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

Instance Method Summary collapse

Methods inherited from BaseController

#patient

Instance Method Details

#editObject



8
9
10
# File 'app/controllers/renalware/low_clearance/profiles_controller.rb', line 8

def edit
  render_edit(find_and_authorize_profile)
end

#updateObject



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

def update
  profile = find_and_authorize_profile
  if profile.update_by(current_user, profile_params)
    redirect_to patient_low_clearance_dashboard_path,
                notice: t(".success", model_name: "profile")
  else
    flash.now[:error] = failed_msg_for("profile")
    render_edit(profile)
  end
end