devise: unify password reset views

By default, Devise will look for views:

1. First in `views/resource/passwords/…`,
2. Then in `views/devise/passwords/…` if not found.

By moving the views to `views/devise`, we avoid having a partial in
`views/shared` that we need to include manually, and instead let Devise
do the job automatically.
This commit is contained in:
Pierre de La Morinerie 2021-08-27 04:29:18 +00:00
parent 80f9d4adc0
commit e5f449b595
7 changed files with 2 additions and 56 deletions

View file

@ -1,14 +0,0 @@
class Administrateurs::PasswordsController < ApplicationController
def test_strength
@score, @words, @length = ZxcvbnService.new(password_params[:password]).complexity
@min_length = PASSWORD_MIN_LENGTH
@min_complexity = PASSWORD_COMPLEXITY_FOR_ADMIN
render 'shared/password/test_strength'
end
private
def password_params
params.require(:administrateur).permit(:password)
end
end