21
1
Fork 0
mirror of https://github.com/Evolix/chexpire.git synced 2024-04-29 15:30:49 +02:00

User validation for locale must have a list of String

This commit is contained in:
Jérémy Lecour 2018-06-13 22:04:10 +02:00
parent 9acab0298a
commit ddee9f44a8

View file

@ -38,7 +38,7 @@ class User < ApplicationRecord
has_many :checks
validates :tos_accepted, acceptance: true
validates :locale, inclusion: { in: I18n.available_locales }
validates :locale, inclusion: { in: I18n.available_locales.map(&:to_s) }
scope :notifications_disabled, -> { where(notifications_enabled: false) }