:case_sensitive => false not working with postgresql


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 (http://dev.rubyonrails.org/changeset/4207) 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 forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs