I am having trouble searching a string by the first letters. For example, if I have "animal", "ant", and "abs" in my database, I would like a query of "an" to return "animal" and "ant" (case insensitive). I got this working just fine with sqlite3:
Thing.where("name LIKE ?", params[:query] + '%')
However, this does not work in PostgreSQL (database used in pushing to Heroku). What is the correct query using PostgreSQL?