Use email field for password reset (#77)

Fixes unsubmmittable password reset form
This commit is contained in:
Dominik M. Kwiatek 2020-04-22 19:22:16 +01:00 committed by GitHub
parent 0c0a5c106c
commit a8c335899d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@
= bootstrap_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f|
= devise_error_messages!
= f.text_field :login, autofocus: true, label: "User name"
= f.email_field :email, autofocus: true, label: "Email address"
= f.submit "Send me password reset instructions"
= render "devise/shared/links"

View File

@ -181,7 +181,7 @@ Devise.setup do |config|
# ==> Configuration for :recoverable
#
# Defines which key will be used when recovering the password for an account
config.reset_password_keys = [ :login ]
config.reset_password_keys = [ :email ]
# Time interval you can reset your password with a reset password key.
# Don't put a too small interval or your users won't have the time to