From ddee9f44a89ac487d004b83a3c037d0d4faa8c76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lecour?= Date: Wed, 13 Jun 2018 22:04:10 +0200 Subject: [PATCH] User validation for locale must have a list of String --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 66a9c2d..695a239 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -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) }