Replace password strength js with ujs

This commit is contained in:
Paul Chavard 2018-09-27 15:11:22 +02:00
parent f0aa78c8a8
commit 3c66fceba5
7 changed files with 9 additions and 44 deletions

View file

@ -32,8 +32,7 @@ class Administrateurs::ActivateController < ApplicationController
end
def test_password_strength
score = Zxcvbn.test(params[:password], [], ZXCVBN_DICTIONNARIES).score
render json: { score: score }
@score = Zxcvbn.test(params[:administrateur][:password], [], ZXCVBN_DICTIONNARIES).score
end
private