Class: Hello::Management::ResetPasswordController

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

Overview

you really should be overriding concerns instead of this file

Instance Method Summary collapse

Methods included from Concerns::Management::ResetPassword

#on_failure, #on_success

Instance Method Details

#indexObject

GET /passwords/:id/reset/:user_id/:token



23
24
25
# File 'app/controllers/hello/management/reset_password_controller.rb', line 23

def index
  render_reset_form
end

#updateObject

POST /passwords/:id/reset/:user_id/:token



28
29
30
31
32
33
34
35
# File 'app/controllers/hello/management/reset_password_controller.rb', line 28

def update
  if @reset_password.update_password(new_password)
    flash[:notice] = @reset_password.success_message
    on_success
  else
    on_failure
  end
end