1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-18 20:59:39 +02:00
Maybe/app/controllers/passwords_controller.rb

19 lines
426 B
Ruby
Raw Normal View History

2024-02-02 09:05:04 -06:00
class PasswordsController < ApplicationController
def edit
end
def update
2024-02-05 10:36:46 +11:00
if Current.user.update(password_params)
redirect_to root_path, notice: t(".success")
2024-02-02 09:05:04 -06:00
else
render :edit, status: :unprocessable_entity
end
end
private
def password_params
params.require(:user).permit(:password, :password_confirmation, :password_challenge).with_defaults(password_challenge: "")
end
2024-02-02 09:05:04 -06:00
end