Мне нужно обновить приложение rails, используя Devise, чтобы показать количество оставшихся минут, если вы заблокированы при попытке входа в приложение.
В devise.en.yml У меня есть файл:
en:
devise:
confirmations:
confirmed: "Your email address has been successfully confirmed."
send_instructions: "You will receive an email with instructions for how to confirm your email address in a few minutes."
send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes."
failure:
already_authenticated: "You are already signed in."
inactive: "Your account is not activated yet."
invalid: "Invalid %{authentication_keys} or password."
locked: "Your account is locked. Please try again in %{number_of_minutes} minutes"
last_attempt: "You have one more attempt before your account is locked."
not_found_in_database: "Invalid %{authentication_keys} or password."
timeout: "Your session expired. Please sign in again to continue."
unauthenticated: "You need to sign in or sign up before continuing."
В заблокированном сообщении об ошибке есть переменная 'number_of_minutes', но независимо от того, что я пытаюсь получить, я получаю:
missing interpolation argument :number_of_minutes in "Your account is locked. Please try again in %{number_of_minutes} minutes" ({:resource_name=>:user, :authentication_keys=>"E-mail address"} given)
Я добавил его в представление, переопределенный SessionsController, установил локаль по умолчанию, перепробовал целую кучу онлайн-рекомендаций и не повезло.
Есть идеи?
Приветствия, Адриан