summaryrefslogtreecommitdiffstats
path: root/app/models/custom_field.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2021-04-01 14:32:23 +0000
committerGo MAEDA <maeda@farend.jp>2021-04-01 14:32:23 +0000
commit2a564a1376b692c200d342acf236567ae1f12101 (patch)
tree7a4fa7f4bfaad072babffc9b893fbcbd26d6aaef /app/models/custom_field.rb
parent282adb80d4436f126cf8d292016a041c7363bf96 (diff)
downloadredmine-2a564a1376b692c200d342acf236567ae1f12101.tar.gz
redmine-2a564a1376b692c200d342acf236567ae1f12101.zip
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
Diffstat (limited to 'app/models/custom_field.rb')
-rw-r--r--app/models/custom_field.rb2
1 files changed, 1 insertions, 1 deletions
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,