summaryrefslogtreecommitdiffstats
path: root/app/models/watcher.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/watcher.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/watcher.rb')
-rw-r--r--app/models/watcher.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/watcher.rb b/app/models/watcher.rb
index 8ea457060..c17ceae7b 100644
--- a/app/models/watcher.rb
+++ b/app/models/watcher.rb
@@ -22,7 +22,7 @@ class Watcher < ActiveRecord::Base
belongs_to :user
validates_presence_of :user
- validates_uniqueness_of :user_id, :scope => [:watchable_type, :watchable_id]
+ validates_uniqueness_of :user_id, :scope => [:watchable_type, :watchable_id], :case_sensitive => false
validate :validate_user
# Returns true if at least one object among objects is watched by user