mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Make conditional more concise
This commit is contained in:
@@ -21,7 +21,7 @@ class UserLocaleSetter
|
||||
end
|
||||
|
||||
def self.valid_locale_for_user(user)
|
||||
if user.present? && user.locale.present? && available_locale?(user.locale)
|
||||
if user.andand.locale.present? && available_locale?(user.locale)
|
||||
user.locale
|
||||
else
|
||||
I18n.default_locale
|
||||
|
||||
Reference in New Issue
Block a user