From 2a564a1376b692c200d342acf236567ae1f12101 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Thu, 1 Apr 2021 14:32:23 +0000 Subject: DEPRECATION WARNING: Uniqueness validator will no longer enforce case sensitive comparison in Rails 6.1. (#29914, #32897). Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@20880 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/custom_field.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models/custom_field.rb') diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb index ed44d552c..9787b2ee4 100644 --- a/app/models/custom_field.rb +++ b/app/models/custom_field.rb @@ -34,7 +34,7 @@ class CustomField < ActiveRecord::Base store :format_store validates_presence_of :name, :field_format - validates_uniqueness_of :name, :scope => :type + validates_uniqueness_of :name, :scope => :type, :case_sensitive => true validates_length_of :name, :maximum => 30 validates_length_of :regexp, maximum: 255 validates_inclusion_of :field_format, -- cgit v1.2.3