Sha256: 140366d5402e757475c85b956b64addd6c01201bc2ec3a37bfc0d7ba4a255b73
Contents?: true
Size: 542 Bytes
Versions: 9
Compression:
Stored size: 542 Bytes
Contents
class Auth::NewPasswordController < ApplicationController include RedirectIfAuthenticated skip_authenticate def new render inertia: 'Auth/ResetPassword', props: { token: params[:token] } end def create form = Auth::NewPasswordForm.new(params.permit(:token, :password, :password_confirmation)) return redirect_to login_path, flash: { status: 'Your password has been reset.' } if form.reset? redirect_back_or_to password_reset_path(token: form.token), inertia: { errors: form.error_messages } end end
Version data entries
9 entries across 9 versions & 1 rubygems