summaryrefslogtreecommitdiffstats
path: root/app/models/enumeration.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2020-01-28 09:49:14 +0000
committerGo MAEDA <maeda@farend.jp>2020-01-28 09:49:14 +0000
commit10bb12e09f81dcc56f7a11342b841b9b7cf8d53e (patch)
tree69815d31ef0e7535a71c328009c88f52e7d1a126 /app/models/enumeration.rb
parentafe9b9b31d925eb4ee05f31e8391c797c7b87028 (diff)
downloadredmine-10bb12e09f81dcc56f7a11342b841b9b7cf8d53e.tar.gz
redmine-10bb12e09f81dcc56f7a11342b841b9b7cf8d53e.zip
Fix 'DEPRECATION WARNING: Uniqueness validator will no longer enforce case sensitive comparison in Rails 6.1.' (#32897).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@19478 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/enumeration.rb')
-rw-r--r--app/models/enumeration.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/enumeration.rb b/app/models/enumeration.rb
index 70dda077b..6a3f16a02 100644
--- a/app/models/enumeration.rb
+++ b/app/models/enumeration.rb
@@ -32,7 +32,7 @@ class Enumeration < ActiveRecord::Base
before_save :check_default
validates_presence_of :name
- validates_uniqueness_of :name, :scope => [:type, :project_id]
+ validates_uniqueness_of :name, :scope => [:type, :project_id], :case_sensitive => false
validates_length_of :name, :maximum => 30
scope :shared, lambda { where(:project_id => nil) }