Class: StandardId::Web::ResetPassword::StartController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/standard_id/web/reset_password/start_controller.rb

Instance Method Summary collapse

Methods included from ControllerPolicy

all_controllers, authenticated_controllers, public_controllers, register, registry_snapshot, reset_registry!

Instance Method Details

#createObject



15
16
17
18
19
20
21
22
23
24
25
# File 'app/controllers/standard_id/web/reset_password/start_controller.rb', line 15

def create
  form = StandardId::Web::ResetPasswordStartForm.new(email: params[:email])

  if form.submit
    flash[:notice] = "If an account with that email exists, we've sent password reset instructions."
    redirect_to , status: :see_other
  else
    flash.now[:alert] = form.errors[:email].first || "Please enter your email address"
    render :show, status: :unprocessable_content
  end
end

#showObject



11
12
13
# File 'app/controllers/standard_id/web/reset_password/start_controller.rb', line 11

def show
  # Display the password reset request form
end