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
Zach Gollwitzer eef4c2643b
Rubocop updates (#1118)
* Minimal code style enforcement

* Formatting and lint code updates (no change in functionality)
2024-08-23 10:06:24 -04:00

18 lines
426 B
Ruby

class PasswordsController < ApplicationController
def edit
end
def update
if Current.user.update(password_params)
redirect_to root_path, notice: t(".success")
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
end