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

Version Path
kaze-0.17.0 stubs/inertia-common/app/controllers/auth/new_password_controller.rb
kaze-0.16.0 stubs/inertia-common/app/controllers/auth/new_password_controller.rb
kaze-0.15.0 stubs/inertia-common/app/controllers/auth/new_password_controller.rb
kaze-0.14.0 stubs/inertia-common/app/controllers/auth/new_password_controller.rb
kaze-0.13.0 stubs/inertia-common/app/controllers/auth/new_password_controller.rb
kaze-0.12.0 stubs/inertia-common/app/controllers/auth/new_password_controller.rb
kaze-0.11.0 stubs/inertia-common/app/controllers/auth/new_password_controller.rb
kaze-0.10.0 stubs/inertia-common/app/controllers/auth/new_password_controller.rb
kaze-0.9.0 stubs/inertia-common/app/controllers/auth/new_password_controller.rb