Make conditional more concise

This commit is contained in:
Matt-Yorkley
2020-07-03 14:20:51 +02:00
parent ebffa381c6
commit dab0add492

View File

@@ -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