How to escape for MYSQL queries from Ruby on Rails?

Viewed 13250

When searching the MYSQL database for a Rails 2.3.14 app, I need to escape the search string appropriately so I can search for strings containing single-quotes (apostrophes). What's the best way to do this? I'm using the mysql gem, in case that matters.

3 Answers
Related