summaryrefslogtreecommitdiffstats
path: root/app/models/repository.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/repository.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/repository.rb')
-rw-r--r--app/models/repository.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb
index 089027c9d..f20eacc20 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -43,7 +43,7 @@ class Repository < ActiveRecord::Base
validates_length_of :password, :maximum => 255, :allow_nil => true
validates_length_of :root_url, :url, maximum: 255
validates_length_of :identifier, :maximum => IDENTIFIER_MAX_LENGTH, :allow_blank => true
- validates_uniqueness_of :identifier, :scope => :project_id
+ validates_uniqueness_of :identifier, :scope => :project_id, :case_sensitive => false
validates_exclusion_of :identifier, :in => %w(browse show entry raw changes annotate diff statistics graph revisions revision)
# donwcase letters, digits, dashes, underscores but not digits only
validates_format_of :identifier, :with => /\A(?!\d+$)[a-z0-9\-_]*\z/, :allow_blank => true