Class: EasyAdmin::ProfileController
Instance Method Summary
collapse
Methods included from TwoFactor
#change_password, #regenerate_backup_codes, #two_factor_backup_codes, #two_factor_enable, #two_factor_setup, #update_password
#policy_for
Instance Method Details
#index ⇒ Object
5
6
7
|
# File 'app/controllers/easy_admin/profile_controller.rb', line 5
def index
@user = current_admin_user
end
|
#update ⇒ Object
9
10
11
12
13
14
15
16
17
|
# File 'app/controllers/easy_admin/profile_controller.rb', line 9
def update
@user = current_admin_user
if @user.update(profile_params)
redirect_to profile_path, notice: 'Profile updated successfully'
else
redirect_to profile_path, alert: 'Failed to update profile'
end
end
|