Merge pull request #4001 from rockandror/check-session-locale

Discard session[:locale] when is not valid
This commit is contained in:
Javier Martín
2020-06-25 22:00:37 +02:00
committed by GitHub
5 changed files with 34 additions and 14 deletions

View File

@@ -18,8 +18,9 @@ class Admin::SiteCustomization::InformationTextsController < Admin::SiteCustomiz
next
else
text = I18nContent.find_or_create_by!(key: content[:id])
Globalize.locale = locale
text.update!(value: value)
Globalize.with_locale(locale) do
text.update!(value: value)
end
end
end
end