mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 05:09:38 +02:00
* Add i18n-tasks
* Add auth-related i18n
* Centralize auth messages
* Remove safe navigation
* Revert "Remove safe navigation"
This reverts commit 56b5e01e5e
.
* Remove newline in Gemfile
20 lines
457 B
Ruby
20 lines
457 B
Ruby
class PasswordsController < ApplicationController
|
|
before_action :authenticate_user!
|
|
|
|
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
|