Update Password Bug?
- The redirect was wrong
- The params were missing the require(:user)
module Account class PasswordsController < ApplicationController before_action :authenticate_user! def show redirect_to action: :edit end def edit end def update if current_user.update_with_password(password_params) bypass_sign_in current_user redirect_to edit_account_password_path, notice: "Your password was changed successfully" else render action: :edit end end private def password_params params.require(:user).permit(:current_password, :password, :password_confirmation) end end end
Looks like this was fixed in the official repo a few weeks ago 👍
https://gitlab.com/gorails/jumpstart-pro/commit/f938570facb174ba1360cdc7a5d5ff21b923e66f
https://gitlab.com/gorails/jumpstart-pro/commit/f938570facb174ba1360cdc7a5d5ff21b923e66f
Notifications
You’re not receiving notifications from this thread.