Class: PasswordResetsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/password_resets_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject

Send a password update link to users with a verified email



12
13
14
15
16
17
18
19
# File 'app/controllers/password_resets_controller.rb', line 12

def create
  if user
    user.regenerate_verification_token
    MinimalistAuthenticationMailer.update_password(user).deliver_now
  end
  # always display notice even if the user was not found to prevent leaking user emails
  redirect_to new_session_path, notice: "Password reset instructions were mailed to #{email}"
end

#newObject

Form for user to request a password reset



7
8
9
# File 'app/controllers/password_resets_controller.rb', line 7

def new
  @user = MinimalistAuthentication.configuration.user_model.new
end