I run MySQL in my dev environment, but Postgres in my production
environment (out of necessity). I’m having trouble finding a way to
write a query with a LIKE condition that is supported as case
insensitive in both databases.
Right now, I have this:
@query = “m” # for example
@people = Person.find(:all, :conditions => [“last_name LIKE ?”, @query +
This works in MySQL, but in Postgres, it’s case sensitive. If I
change it to support the Postgres syntax, it doesn’t work in MySQL.
Is there a more Rails way to handle this?