Forum: Ruby on Rails :case_sensitive => false not working with postgresql

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ben (Guest)
on 2006-05-14 20:22
(Received via mailing list)

I'm trying to get login validations to be case insensitive. After doing
some research, I found out that postgres and sqlite are case sensitive
by default.

This changeset ( should fix
the bug. I'm running rails 1.1.2. I can't figure out if this is part of
my version of rails, or if I'd have to move to edge to get the

My code simply looks like this:

validates_uniqueness_of :login, :case_sensitive => false

However, entering login variants such as "test", "Test", "tEST" creates
these logins without complaint. Not exactly what I want.

Is there a way to attach the condition sql manually?


This topic is locked and can not be replied to.