Class: Hello::Management::ForgotPasswordController

Inherits:
ApplicationController show all
Includes:
Concerns::Management::ForgotPassword
Defined in:
app/controllers/hello/management/forgot_password_controller.rb

Overview

you really should be overriding concerns instead of this file

Instance Method Summary collapse

Methods included from Concerns::Management::ForgotPassword

#on_failure, #on_success

Instance Method Details

#forgotObject

POST /hello/passwords/forgot



18
19
20
21
22
23
24
25
26
27
# File 'app/controllers/hello/management/forgot_password_controller.rb', line 18

def forgot
  @forgot_password = Business::Management::ForgotPassword.new(params.require(:forgot_password))
  @user = @forgot_password.user

  if @forgot_password.reset
    on_success
  else
    on_failure
  end
end

#indexObject

GET /hello/passwords/forgot



12
13
14
15
# File 'app/controllers/hello/management/forgot_password_controller.rb', line 12

def index
  @forgot_password = Business::Management::ForgotPassword.new
  render 'hello/management/password_credentials/forgot'
end