Remove a deprecation warning regarding case sensitivity

Sets the project name validation to be explicitly case sensitive to
remove a warning Rails emits while running the tests locally.
This commit is contained in:
Matt Rogers 2021-08-08 14:52:49 +00:00 committed by GitHub
parent 83b74d43e7
commit 989fca6dd3

View file

@ -16,7 +16,7 @@ class Project < ApplicationRecord
before_create :set_last_reviewed_now
validates :name, presence: true, length: { maximum: 255 }, uniqueness: { scope: :user_id }
validates :name, presence: true, length: { maximum: 255 }, uniqueness: { scope: :user_id, case_sensitive: true }
acts_as_list :scope => 'user_id = #{user_id} AND state = \'#{state}\'', :top_of_list => 0