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 suggested.
Expanding the functionality to support this isn't warranted, just define a scope or use where. -- Cheers Koz On 28/06/2011, at 5:50 PM, Michael Pavling <[email protected]> wrote: > On 28 June 2011 01:14, Ryan Bigg <[email protected]> wrote: >> where("LOWER(email) = ?", email) isn't good enough? > > No. > > It's a particular problem when using the dynamic > "find_or_create_by_email(value)" and the ilk. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
