diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 0628421f..b4be5a97 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -32,7 +32,9 @@ class ApplicationController < ActionController::Base return unless current_usuarie return if current_usuarie.confirmed? - flash[:notice] ||= I18n.t('devise.registrations.signed_up') + I18n.with_locale(current_usuarie.lang) do + flash[:notice] ||= I18n.t('devise.registrations.signed_up') + end end def uuid?(string) @@ -92,6 +94,7 @@ class ApplicationController < ActionController::Base protected def configure_permitted_parameters + devise_parameter_sanitizer.permit(:sign_up, keys: Usuarie::CONSENT_FIELDS) devise_parameter_sanitizer.permit(:account_update, keys: %i[lang]) end