diff --git a/app/controllers/administrateurs/activate_controller.rb b/app/controllers/administrateurs/activate_controller.rb index 7a07d4d21..adb517519 100644 --- a/app/controllers/administrateurs/activate_controller.rb +++ b/app/controllers/administrateurs/activate_controller.rb @@ -2,7 +2,8 @@ class Administrateurs::ActivateController < ApplicationController include TrustedDeviceConcern def new - @administrateur = Administrateur.find_inactive_by_token(params[:token]) + @token = params[:token] + @administrateur = Administrateur.find_inactive_by_token(@token) if @administrateur # the administrateur activates its account from an email diff --git a/app/views/administrateurs/activate/new.html.haml b/app/views/administrateurs/activate/new.html.haml index b447c8bab..ae11eebdc 100644 --- a/app/views/administrateurs/activate/new.html.haml +++ b/app/views/administrateurs/activate/new.html.haml @@ -10,7 +10,7 @@ %h1 Choix du mot de passe - = f.hidden_field :reset_password_token, value: @administrateur.reset_password_token + = f.hidden_field :reset_password_token, value: @token = f.label :email, "Email" = f.text_field :email, disabled: true