diff options
author | Matt Jankowski <mjankowski@thoughtbot.com> | 2017-05-18 21:11:23 -0400 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-05-19 03:11:23 +0200 |
commit | 6e4c7d62118d5d1f2e966950edfdbc80cebd4d7c (patch) | |
tree | 886a8215d03ab975211a463bd33aee1331cc7bb9 /app/models/user.rb | |
parent | d2542dcec0dafa8878efd2bd4fe53bd80256aa60 (diff) |
Conditional validations no longer accept strings for if/unless (#3124)
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 66a8edfc1..7cf3a1290 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -45,7 +45,7 @@ class User < ApplicationRecord belongs_to :account, inverse_of: :user, required: true accepts_nested_attributes_for :account - validates :locale, inclusion: I18n.available_locales.map(&:to_s), unless: 'locale.nil?' + validates :locale, inclusion: I18n.available_locales.map(&:to_s), if: :locale? validates :email, email: true scope :recent, -> { order(id: :desc) } |