5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-26 02:36:22 +00:00

fix: hacer que devise respete el idioma de la sesión #10478

This commit is contained in:
f 2023-03-31 20:20:37 -03:00
parent c0f1c41f52
commit 8e7213ffe1

View file

@ -0,0 +1,21 @@
# frozen_string_literal: true
module Devise
module FailureAppDecorator
extend ActiveSupport::Concern
included do
include AbstractController::Callbacks
around_action :set_locale
private
def set_locale(&action)
I18n.with_locale(session[:locale] || I18n.locale, &action)
end
end
end
end
Devise::FailureApp.include Devise::FailureAppDecorator