How to do case-insensitive order in Rails with postgresql

Posted by brad on Stack Overflow See other posts from Stack Overflow or by brad
Published on 2010-06-06T09:18:24Z Indexed on 2010/06/06 9:22 UTC
Read the original article Hit count: 371

I am in the process of switching my development environment from sqlite3 to postgresql 8.4 and have one last hurdle.

In my original I had the following line in a helper method;

result = Users.find(:all, :order => "name collate NOCASE")

which provided a very nice case-insensitive search. I can't replicate this for postgresql. Should be easy - any ideas?

Thanks.

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about ruby