Case insensitive string match?

5 views
Skip to first unread message

Erik Dahlstrand

unread,
Nov 24, 2009, 3:01:38 AM11/24/09
to Searchlogic
Hi,

User.username_equals("bjohnson") generates
SELECT * FROM "users" WHERE ("users"."username" = E'bjohnson') LIMIT 1

On Postgresql it doesn't match e.g. 'BJohnson'.

Is there a dynamic named scope that generate this query?
SELECT * FROM "users" WHERE ("users"."username" ILIKE E'bjohnson')
LIMIT 1

/Erik
Reply all
Reply to author
Forward
0 new messages