Class: Admin::ProfilesController

Inherits:
ApplicationController show all
Includes:
Koi::Controller::HasWebauthn
Defined in:
app/controllers/admin/profiles_controller.rb

Instance Method Summary collapse

Methods included from Koi::Controller::HasWebauthn

#webauthn_authenticate!, #webauthn_nickname, #webauthn_register!, #webauthn_relying_party

Instance Method Details

#editObject



15
16
17
# File 'app/controllers/admin/profiles_controller.rb', line 15

def edit
  render :edit, locals: { admin_user: }
end

#showObject



11
12
13
# File 'app/controllers/admin/profiles_controller.rb', line 11

def show
  render locals: { admin_user: }
end

#updateObject



19
20
21
22
23
24
25
# File 'app/controllers/admin/profiles_controller.rb', line 19

def update
  if admin_user.update(profile_params)
    redirect_to admin_profile_path, status: :see_other
  else
    render :edit, locals: { admin_user: }, status: :unprocessable_content
  end
end