case insensitive finders

It would be useful for issues such as
(Login and mail should not be case sensitive) to support case
insensitive finds via the dynamic finders. This is particularly a
problem for postgresql users which is case sensitive by default.

Currently people seem to be applying various workarounds (e.g. change
from issue above or
to deal with this.

I'm not sure whether this is best done as an option to the finder or
otherwise. Does anyone have any thoughts on the matter or pointers on


where(“LOWER(email) = ?”, email) isn’t good enough?


It's a particular problem when using the dynamic
"find_or_create_by_email(value)" and the ilk.

The dynamic finders are just syntactic sugar for doing equality based
queries. If your database's collation isn't case-insensitive and you
want to do case-insensitive queries you'll have to use where as ryan

Expanding the functionality to support this isn't warranted, just
define a scope or use where.