mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-24 05:38:52 +00:00
Update cookies[:locale] logic
This commit is contained in:
@@ -45,9 +45,9 @@ class UserLocaleSetter
|
||||
|
||||
def save_locale_from_cookies
|
||||
return unless current_user_locale.nil? && cookies[:locale] &&
|
||||
available_locale?(params_locale)
|
||||
available_locale?(cookies[:locale])
|
||||
|
||||
current_user&.update!(locale: params_locale)
|
||||
current_user&.update!(locale: cookies[:locale])
|
||||
end
|
||||
|
||||
def available_locale?(locale)
|
||||
|
||||
Reference in New Issue
Block a user