Simplify code involving Globalize.locale

We don't need to set this value. In commit f2ef27d3 I made a mistake
thinking `Globalize.locale` and `I18n.locale` should always be in sync,
but they're actually automatically in sync when `Globalize.locale` is
`nil`.

So the best way to avoid any issues is not to assign `Globalize.locale`,
and use `Globalize.with_locale` where necessary instead.
This commit is contained in:
Javi Martín
2020-06-19 12:41:37 +02:00
committed by taitus
parent dcf0a50b73
commit 002e9239d0
4 changed files with 3 additions and 5 deletions

View File

@@ -55,7 +55,6 @@ class ApplicationController < ActionController::Base
end
I18n.locale = locale
Globalize.locale = I18n.locale
end
def set_layout