Project

General

Profile

Actions

Defect #32897

closed

Rails 6: Pass `case_sensitive: true` option explicitly to the uniqueness validator

Added by Marius BĂLTEANU about 4 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Code cleanup/refactoring
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Rails 6 displays deprecation warning for uniqueness validator:

DEPRECATION WARNING: Uniqueness validator will no longer enforce case sensitive comparison in Rails 6.1. To continue case sensitive comparison on the :identifier attribute in Project model, pass `case_sensitive: true` option explicitly to the uniqueness validator. 

https://github.com/rails/rails/pull/35350


Files


Related issues

Related to Redmine - Feature #29914: Migrate to Rails 6.1 with Zeitwerk autoloadingClosedGo MAEDA

Actions
Actions #1

Updated by Marius BĂLTEANU about 4 years ago

  • Related to Feature #29914: Migrate to Rails 6.1 with Zeitwerk autoloading added
Actions #2

Updated by Marius BĂLTEANU about 4 years ago

  • File 0001-Fix-DEPRECATION-WARNING-Uniqueness-validator-will-no.patch added

Tests results here.

Actions #3

Updated by Go MAEDA about 4 years ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA

Committed the patch. Thank you for your contribution.

Actions #4

Updated by Marius BĂLTEANU about 4 years ago

  • Status changed from Closed to Reopened

Sorry, I've attached a broken patch, please revert it and will post later the correct one.

Actions #6

Updated by Go MAEDA about 4 years ago

Marius BALTEANU wrote:

Sorry, I've attached a broken patch, please revert it and will post later the correct one.

Done.

Actions #7

Updated by Marius BĂLTEANU about 4 years ago

Go MAEDA wrote:

Marius BALTEANU wrote:

Sorry, I've attached a broken patch, please revert it and will post later the correct one.

Done.

Thanks, patch from #note-5 is the correct one, you can commit it.

Actions #8

Updated by Marius BĂLTEANU about 4 years ago

  • File deleted (0001-Fix-DEPRECATION-WARNING-Uniqueness-validator-will-no.patch)
Actions #9

Updated by Marius BĂLTEANU about 3 years ago

  • Target version changed from 4.2.0 to 5.0.0

We can fix this in 5.0.0.

Actions #10

Updated by Marius BĂLTEANU about 3 years ago

Go MAEDA, is anything I can do to have this change committed?

Actions #11

Updated by Marius BĂLTEANU almost 3 years ago

  • Tracker changed from Patch to Defect
Actions #12

Updated by Marius BĂLTEANU almost 3 years ago

  • Target version deleted (5.0.0)
Actions #13

Updated by Go MAEDA almost 3 years ago

  • Status changed from Reopened to Closed
  • Resolution set to Fixed

Committed as a part of #29914.

Actions

Also available in: Atom PDF