21
1
Fork 0
mirror of https://github.com/Evolix/chexpire.git synced 2024-05-03 09:20: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 0ea57160e8
commit 6dafa92866

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) }