mirror of
https://github.com/redmine/redmine.git
synced 2025-11-13 08:46:01 +01:00
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
This commit is contained in:
@@ -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) }
|
||||
|
||||
Reference in New Issue
Block a user